mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化 旧货显示
This commit is contained in:
parent
9f6f6150a2
commit
281f9d1659
@ -59,14 +59,14 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>旧货信息</h5>
|
||||
<h5>{{junkRequirementManageInfo.pageName}}信息</h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">旧货编码</th>
|
||||
<th class="text-center">{{junkRequirementManageInfo.pageName}}编码</th>
|
||||
<th class="text-center">类别</th>
|
||||
<th class="text-center">参考价格</th>
|
||||
<th class="text-center">发布人</th>
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
junkRequirementId: '',
|
||||
pageName:'旧货',
|
||||
conditions: {
|
||||
classification: '',
|
||||
publishUserName: '',
|
||||
@ -24,6 +25,12 @@
|
||||
_initMethod: function () {
|
||||
vc.component._listJunkRequirements(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
$that.junkRequirementManageInfo.conditions.typeCd = vc.getParam('typeCd');
|
||||
if(vc.getParam('typeCd') == '333333'){
|
||||
$that.junkRequirementManageInfo.pageName = '需求';
|
||||
}else{
|
||||
$that.junkRequirementManageInfo.pageName = '旧货';
|
||||
|
||||
}
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
@ -39,6 +46,7 @@
|
||||
|
||||
vc.component.junkRequirementManageInfo.conditions.page = _page;
|
||||
vc.component.junkRequirementManageInfo.conditions.row = _rows;
|
||||
vc.component.junkRequirementManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
|
||||
var param = {
|
||||
params: vc.component.junkRequirementManageInfo.conditions
|
||||
};
|
||||
|
||||
@ -1,87 +1,87 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function(vc){
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data:{
|
||||
resourceStoreManageInfo:{
|
||||
resourceStores:[],
|
||||
total:0,
|
||||
records:1,
|
||||
moreCondition:false,
|
||||
resName:'',
|
||||
conditions:{
|
||||
resId:'',
|
||||
resName:'',
|
||||
resCode:'',
|
||||
data: {
|
||||
resourceStoreManageInfo: {
|
||||
resourceStores: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
resName: '',
|
||||
conditions: {
|
||||
resId: '',
|
||||
resName: '',
|
||||
resCode: '',
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
_initMethod: function () {
|
||||
vc.component._listResourceStores(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent:function(){
|
||||
|
||||
vc.on('resourceStoreManage','listResourceStore',function(_param){
|
||||
vc.component._listResourceStores(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('resourceStoreManage', 'listResourceStore', function (_param) {
|
||||
vc.component._listResourceStores(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination','page_event',function(_currentPage){
|
||||
vc.component._listResourceStores(_currentPage,DEFAULT_ROWS);
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listResourceStores(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
_listResourceStores:function(_page, _rows){
|
||||
methods: {
|
||||
_listResourceStores: function (_page, _rows) {
|
||||
|
||||
vc.component.resourceStoreManageInfo.conditions.page = _page;
|
||||
vc.component.resourceStoreManageInfo.conditions.row = _rows;
|
||||
vc.component.resourceStoreManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
|
||||
var param = {
|
||||
params:vc.component.resourceStoreManageInfo.conditions
|
||||
};
|
||||
params: vc.component.resourceStoreManageInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.get('resourceStoreManage',
|
||||
'list',
|
||||
param,
|
||||
function(json,res){
|
||||
var _resourceStoreManageInfo=JSON.parse(json);
|
||||
vc.component.resourceStoreManageInfo.total = _resourceStoreManageInfo.total;
|
||||
vc.component.resourceStoreManageInfo.records = _resourceStoreManageInfo.records;
|
||||
vc.component.resourceStoreManageInfo.resourceStores = _resourceStoreManageInfo.resourceStores;
|
||||
vc.emit('pagination','init',{
|
||||
total:vc.component.resourceStoreManageInfo.records,
|
||||
currentPage:_page
|
||||
});
|
||||
},function(errInfo,error){
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
//发送get请求
|
||||
vc.http.get('resourceStoreManage',
|
||||
'list',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _resourceStoreManageInfo = JSON.parse(json);
|
||||
vc.component.resourceStoreManageInfo.total = _resourceStoreManageInfo.total;
|
||||
vc.component.resourceStoreManageInfo.records = _resourceStoreManageInfo.records;
|
||||
vc.component.resourceStoreManageInfo.resourceStores = _resourceStoreManageInfo.resourceStores;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.resourceStoreManageInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddResourceStoreModal:function(){
|
||||
vc.emit('addResourceStore','openAddResourceStoreModal',{});
|
||||
_openAddResourceStoreModal: function () {
|
||||
vc.emit('addResourceStore', 'openAddResourceStoreModal', {});
|
||||
},
|
||||
_openEditResourceStoreModel:function(_resourceStore){
|
||||
vc.emit('editResourceStore','openEditResourceStoreModal',_resourceStore);
|
||||
_openEditResourceStoreModel: function (_resourceStore) {
|
||||
vc.emit('editResourceStore', 'openEditResourceStoreModal', _resourceStore);
|
||||
},
|
||||
_openDeleteResourceStoreModel:function(_resourceStore){
|
||||
vc.emit('deleteResourceStore','openDeleteResourceStoreModal',_resourceStore);
|
||||
_openDeleteResourceStoreModel: function (_resourceStore) {
|
||||
vc.emit('deleteResourceStore', 'openDeleteResourceStoreModal', _resourceStore);
|
||||
},
|
||||
_queryResourceStoreMethod:function(){
|
||||
_queryResourceStoreMethod: function () {
|
||||
vc.component._listResourceStores(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition:function(){
|
||||
if(vc.component.resourceStoreManageInfo.moreCondition){
|
||||
_moreCondition: function () {
|
||||
if (vc.component.resourceStoreManageInfo.moreCondition) {
|
||||
vc.component.resourceStoreManageInfo.moreCondition = false;
|
||||
}else{
|
||||
} else {
|
||||
vc.component.resourceStoreManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
|
||||
@ -30,78 +30,6 @@
|
||||
return vc.validate.validate({
|
||||
editJunkRequirementInfo: vc.component.editJunkRequirementInfo
|
||||
}, {
|
||||
'editJunkRequirementInfo.classification': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "类别不能为空"
|
||||
},
|
||||
{
|
||||
limit: "num",
|
||||
param: "",
|
||||
errInfo: "任务编码格式错误"
|
||||
},
|
||||
],
|
||||
'editJunkRequirementInfo.inspectionPlanId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "巡检计划不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxin",
|
||||
param: "1,100",
|
||||
errInfo: "收费项目不能超过100位"
|
||||
},
|
||||
],
|
||||
'editJunkRequirementInfo.context': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "内容不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "200",
|
||||
errInfo: "内容不能超过200个字符"
|
||||
},
|
||||
],
|
||||
'editJunkRequirementInfo.referencePrice': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "参考价格不能为空"
|
||||
},
|
||||
{
|
||||
limit: "money",
|
||||
param: "",
|
||||
errInfo: "参考价格格式错误"
|
||||
},
|
||||
],
|
||||
'editJunkRequirementInfo.publishUserName': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "发布人不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "50",
|
||||
errInfo: "发布人不能超过50"
|
||||
},
|
||||
],
|
||||
'editJunkRequirementInfo.publishUserLink': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "联系方式不能为空"
|
||||
},
|
||||
{
|
||||
limit: "phone",
|
||||
param: "",
|
||||
errInfo: "联系方式不是有效的电话格式"
|
||||
},
|
||||
],
|
||||
'editJunkRequirementInfo.state': [
|
||||
{
|
||||
limit: "required",
|
||||
@ -118,7 +46,7 @@
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "旧货编码不能为空"
|
||||
errInfo: "编码不能为空"
|
||||
}]
|
||||
|
||||
});
|
||||
@ -128,6 +56,7 @@
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
vc.component.editJunkRequirementInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
|
||||
vc.http.apiPost(
|
||||
'junkRequirement.updateJunkRequirement',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user