张雄 3 years ago
parent e356554695
commit 5bebf8966b

@ -16,6 +16,14 @@ export function loginTel(params) {
data: params,
})
}
// 密码登录
export function loginPWD(params) {
return httpService({
url: `/loginPWD`,
method: 'post',
data: params,
})
}
// 退出登录
export function quit(params) {
return httpService({

@ -59,8 +59,8 @@ export default {
initWebSocket: function() {
let communityCode = store.getters.getCommunityCode;
let nickName = store.getters.getUserInfo.userName;
let url = 'wss://saas.kaidalai.cn/websocket/manage/'+ communityCode +'/'+ nickName;
let userId = store.getters.getUserInfo.id;
let url = 'wss://saas.kaidalai.cn/websocket/manage/'+ communityCode +'/'+ nickName + '/' + userId;
this.websock = new WebSocket(url)
this.websock.onopen = this.websocketOnopen
this.websock.onerror = this.websocketOnerror

@ -3,7 +3,7 @@ import "nprogress/nprogress.css"
import router from "@/router"
import store from '@/store'
const whitePath = [ '/login','/rule','/yszc']
const whitePath = [ '/login','/rule','/yszc','/fromPlatform']
// 判断登录
router.beforeEach((to, from, next) => {
NProgress.start()

@ -97,6 +97,12 @@ const router = [
title: "隐私政策",
component: resolve => require(['@/views/Yszc'], resolve)
},
{
path: "/fromPlatform",
name: "fromPlatform",
title: "跳转登录",
component: resolve => require(['@/views/FromPlatform'], resolve)
},
{
path: "/login",
name: "Login",

@ -8,6 +8,12 @@ export default {
Vue.prototype.qs = qs
// 上传
Vue.prototype.$upload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/upload/uploadImg'
// 上传员工/房屋/住户/单元/楼栋EXCEL
Vue.prototype.$excelUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importManageUserExcel'
Vue.prototype.$houseUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importEstateExcel'
Vue.prototype.$residentUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importResidentExcel'
Vue.prototype.$unitUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importUnitExcel'
Vue.prototype.$buildingUpload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/importExcel/importBuildingExcel'
// 静态地址
Vue.prototype.$ImgUrl = (src) => {
return process.env.VUE_APP_STATIC + store.getters.getCommunityCode + '/' + src

@ -61,6 +61,11 @@
<a-button class='add-btn' :loading="loading" @click="addStaff()">
新增员工
</a-button>
<a-upload name="file" :action="`${$excelUpload}`"
accept=".xls,.XLS,.xlsx,.XLSX"
:headers="uploadHeaders" @change="changeFile">
<a-button><a-icon type="upload" /> 批量导入</a-button>
</a-upload>
<a-button :disabled="!hasSelected" :loading="loading">
批量操作
</a-button>
@ -202,6 +207,7 @@
</div>
</template>
<script>
import store from "@/store";
import { columns, pagination, searchForm } from "./depend/config.js";
import vueForm from "./depend/form.vue";
import {
@ -273,6 +279,10 @@ export default {
loading: false,
selectedRowKeys: [],
type: "add",
//
uploadHeaders: {
"manage-login-token": store.getters.getToken,
}
};
},
mounted() {
@ -555,6 +565,13 @@ export default {
}
}
},
//
changeFile() {
},
beforeUpload() {
}
},
computed: {
hasSelected() {

@ -3,10 +3,15 @@
* 表格列
*/
export const columns = [
{
title: "导入编号",
dataIndex: "id",
width: "8%",
},
{
title: "楼栋名称",
dataIndex: "name",
width: "20%",
width: "15%",
customRender:function(name){
return name + '栋'
}
@ -14,17 +19,17 @@ export const columns = [
{
title: "房屋总数",
dataIndex: "estateTotals",
width: "20%",
width: "15%",
},
{
title: "租赁房屋数",
dataIndex: "leaseEstateNums",
width: "20%"
width: "15%"
},
{
title: "租赁率",
dataIndex: "leaseRate",
width: "20%",
width: "15%",
customRender:function(leaseRate){
return ( leaseRate*100 ).toFixed(2)+'%'
}
@ -89,15 +94,20 @@ export const rules = {
}
export const unitColumns = [
{
title: "导入编号",
dataIndex: "id",
width: "15%",
},
{
title: "单元号",
dataIndex: "name",
width: "15%",
width: "12%",
},
{
title: "楼层数",
dataIndex: "floor",
width: "15%",
width: "12%",
},
{
title: "公共楼层数",

@ -74,6 +74,11 @@
单元信息
<a-divider></a-divider>
<a-button class='add-btn' @click='addUnit' style="margin-bottom:5px">新增单元</a-button>
<a-upload name="file" :action="`${$unitUpload}`"
accept=".xls,.XLS,.xlsx,.XLSX" :showUploadList="false"
:headers="uploadHeaders" @change="changeFile">
<a-button>批量导入</a-button>
</a-upload>
<a-table :columns="unitColumns" :data-source="unitData" :row-key="record => record.id">
<span slot="action" slot-scope="text, row">
<a-space><a @click="addUnit(text, row)">编辑</a>
@ -128,6 +133,7 @@
</template>
<script>
import store from "@/store";
import { form, rules, unitColumns,uploadHeaders } from "./config";
import { buildInsert,buildUpdate, buildInfo, unitAdd, unitUpdate, unitDel } from '@/api/basic/estate'
function getBase64(file) {
@ -187,7 +193,7 @@ export default {
elevator:[{required:true,message:'是否有电梯',trigger:'change'}],
publicFloor:[{required:true,message:'公共楼层数',trigger:'blur'},{validator: (rule,value,callback) => handleConfirm(rule,value,callback)}],
}
}
},
};
},
methods: {
@ -336,6 +342,12 @@ export default {
fileChange(info) {
this.fileList = info.fileList
},
changeFile(data) {
if(data.file.status == "done") {
this.$message.success('操作成功');
this.getInfo();
}
},
},
watch: {
type: {

@ -14,6 +14,11 @@
</div>
<div class="search-box">
<a-button class="add-btn" @click="addBuilding"></a-button>
<a-upload name="file" :action="`${$buildingUpload}`"
accept=".xls,.XLS,.xlsx,.XLSX" :showUploadList="false"
:headers="uploadHeaders" @change="changeFile">
<a-button><a-icon type="upload" /> 批量导入</a-button>
</a-upload>
</div>
<a-table
:columns="columns"
@ -52,6 +57,7 @@
</template>
<script>
import store from "@/store";
import { columns,searchForm,ActionsList} from "./depend/config"
import { buildingList,buildingDel } from "@/api/basic/estate"
import curdForm from './depend/form.vue'
@ -80,6 +86,10 @@ export default {
//
tableData: [],
editId:undefined,
//
uploadHeaders: {
"manage-login-token": store.getters.getToken,
}
};
},
created() {
@ -152,6 +162,13 @@ export default {
selectionChoosed(data) {
this.tableChoosed = data;
},
//
changeFile(data) {
if(data.file.status == "done") {
this.$message.success('操作成功');
this.getData();
}
},
},
};
</script>

@ -3,6 +3,11 @@
* 表格列
*/
export const columns = [
{
title: "导入编号",
dataIndex: "id",
width: 100
},
{
title: "住户姓名",
dataIndex: "name",

@ -27,6 +27,11 @@
</div>
<div class="search-box">
<a-button class="add-btn" @click="show.add = true">添加住户</a-button>
<a-upload name="file" :action="`${$residentUpload}`"
accept=".xls,.XLS,.xlsx,.XLSX" :showUploadList="false"
:headers="uploadHeaders" @change="changeFile">
<a-button><a-icon type="upload" /> 批量导入</a-button>
</a-upload>
</div>
<div class="main">
<!-- 表格 -->
@ -238,6 +243,7 @@
</template>
<script>
import store from "@/store";
import {
columns,
pagination,
@ -301,6 +307,10 @@ export default {
],
tenant: [],
},
//
uploadHeaders: {
"manage-login-token": store.getters.getToken,
}
};
},
mounted() {
@ -446,8 +456,15 @@ export default {
},
//
handlerBuilding(index) {
},
//
changeFile(data) {
if(data.file.status == "done") {
this.$message.success('操作成功');
this.getData();
}
},
},
computed: {
// selection
hasSelected() {

@ -3,21 +3,26 @@
* 表格列
*/
export const columns = [
{
title: "导入编号",
dataIndex: "id",
width: "8%",
},
{
title: "房屋名称",
dataIndex: "manageBuildingName",
scopedSlots: { customRender: "name" },
width: "20%",
width: "15%",
},
{
title: "室内面积",
dataIndex: "indoorArea",
width: "15%",
width: "12%",
},
{
title: "建筑面积",
dataIndex: "constructionArea",
width: "15%",
width: "12%",
},
{
title: "房屋类型",

@ -19,9 +19,16 @@
</a-row>
</div>
<div class="search-box">
<div style="display: flex">
<a-button class="add-btn" @click="drawerConfig.addShow = true">添加房屋</a-button>
<a-upload name="file" :action="`${$houseUpload}`"
accept=".xls,.XLS,.xlsx,.XLSX" :showUploadList="false"
:headers="uploadHeaders" @change="changeFile">
<a-button><a-icon type="upload" /> 批量导入</a-button>
</a-upload>
<a-button @click="drawerConfig.houseType = true">房屋配置</a-button>
</div>
</div>
<div class="main">
<div style="margin-bottom: 16px">
<!-- 批量操作 -->
@ -142,7 +149,7 @@
<a-tag
v-else-if="item.show==false" closable @close.prevent="delType(item.id)"
@click="editInput(item,index)" >
{{item.name}}
{{item.id+': '}}{{item.name}}
</a-tag>
</span>
<!-- addTag -->
@ -173,6 +180,7 @@
</template>
<script>
import store from "@/store";
import { columns, pagination, searchForm, ActionsList } from "./depend/config";
import { houseList, houseDel, isEnableLease, estateType, estateTypeInsert, estateTypeDel, estateTypeUpdate } from "@/api/basic/estate";
import vueForm from "./depend/form.vue";
@ -223,7 +231,12 @@ export default {
name:'关闭'
},
],
}
},
//
uploadHeaders: {
"manage-login-token": store.getters.getToken,
},
fileList: []
};
},
created() {
@ -385,6 +398,13 @@ export default {
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
},
//
changeFile(data) {
if(data.file.status == "done") {
this.$message.success('操作成功');
this.getData();
}
},
},
computed: {
// selection

@ -12,15 +12,40 @@
<!-- <a-col :span="1" class="box-cen"></a-col> -->
<!-- 登录 -->
<a-col class="box-b" v-if="status === 1">
<a-tabs v-model="activeName" @change="tabsSwitch">
<!-- <a-tab-pane key="1" tab="密码登录"></a-tab-pane> -->
<a-tabs v-model="activeName">
<a-tab-pane key="1" tab="密码登录"></a-tab-pane>
<a-tab-pane key="2" tab="验证码登录"> </a-tab-pane>
</a-tabs>
<div class="login-input" v-if="activeName === '1'">
<div style="margin-top:18px"></div>
<a-cascader
:options="cityList"
placeholder="请选择城市"
v-model="cityvalue"
:show-search="{ filter }"
@change="onChange"
:field-names="{
label: 'name',
value: 'id',
children: 'cityList',
}"
/>
<span class="form">
<a-input placeholder="请输入手机号码"></a-input>
<a-input type="password" placeholder="请输入密码"></a-input>
<a-select
v-model="communityCode"
notFoundContent="该城市无可选择小区"
:disabled="cityvalue.length === 0"
placeholder="请选择小区"
@change="communityChange"
>
<a-select-option
v-for="(item) in communityList"
:key="item.id"
:value="item.code"
>{{ item.name }}</a-select-option
>
</a-select>
<a-input v-model="pwdLogin.username" placeholder="请输入手机号码"></a-input>
<a-input v-model="pwdLogin.password" type="password" placeholder="请输入密码"></a-input>
<!-- <a-row>
<a-col :span="12" style="margin-left: 23px"
><a-checkbox></a-checkbox>&nbsp;&nbsp;</a-col
@ -29,7 +54,7 @@
</span>
<a-button
type="primary"
@click="login"
@click="passwordLogin"
style="
width: 90%;
margin-left: 30px;
@ -42,7 +67,7 @@
</a-button>
<a-row style="margin-top: 20px; margin-left: 23px">
<a-col :span="24">
<a-checkbox></a-checkbox>&nbsp;&nbsp;
<a-checkbox v-model="isChecked"></a-checkbox>&nbsp;&nbsp;我已同
<a href="/#/rule" target="tar">用户协议</a>
<a href="/#/yszc" target="tar">隐私政策</a>
</a-col>
@ -77,6 +102,7 @@
notFoundContent="该城市无可选择小区"
:disabled="cityvalue.length === 0"
placeholder="请选择小区"
@change="communityChange"
>
<a-select-option
v-for="item in communityList"
@ -239,7 +265,7 @@
</template>
<script>
import { loginTel, sendTelCode, userInfo } from "../../api/public/login";
import { loginTel, loginPWD, sendTelCode, userInfo } from "../../api/public/login";
export default {
name: "Login",
data() {
@ -250,7 +276,12 @@ export default {
tel: "",
code: "",
},
pwdLogin: {
username: '',
password: '',
},
isChecked: false,
communityId: undefined,
communityCode: undefined,
rules: {
tel: [
@ -288,6 +319,14 @@ export default {
};
},
created() {
if(this.$route.query.token && this.$route.query.code) {
this.setToken(this.$route.query.token);
this.setCommunityCode(this.$route.query.code);
userInfo().then(result => {
this.setUserInfo(result.data);
this.$router.push("/");
})
}
this.keyupEnter();
this.getAllCity();
},
@ -371,6 +410,30 @@ export default {
}
});
},
passwordLogin() {
if (this.communityCode === undefined) {
this.$message.error("先选择小区");
return;
};
if (this.isChecked == false) {
this.$message.error("请阅读并同意《用户协议》");
return;
};
let obj = Object.assign(this.pwdLogin, {communityId: this.communityId})
loginPWD(obj).then((res) => {
if (res.code === 200) {
this.$message.success(res.msg);
// token
this.setToken(res.data);
userInfo().then(result => {
this.setUserInfo(result.data);
this.$router.push("/");
})
} else {
this.$message.error(res.msg);
}
});
},
//
getCode() {
if (this.communityCode === undefined) {
@ -408,9 +471,10 @@ export default {
resetForm() {
this.$refs.ruleForm.resetFields();
},
tabsSwitch() {
console.log(this.activeName);
},
//id
communityChange(value, option) {
this.communityId = option.key
}
},
};
</script>

@ -15,7 +15,7 @@ export const searchForm = {
export const columns = [
{
title: "任务单号",
width: "12%",
width: "14%",
dataIndex: "code",
},
{
@ -67,7 +67,7 @@ export const columns = [
},
{
title: "备注",
width: "8%",
width: "10%",
dataIndex: "remarks",
},
{
@ -130,7 +130,7 @@ export const columns = [
title: "操作",
dataIndex: "action",
key: "action",
width: "300",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},

@ -7,6 +7,44 @@ export const formItem = [
placeholder:'请选择账单类型'
},
]
export const billColumns = [
{
title: "操作人",
dataIndex: "createName"
},
{
title: "身份类型",
dataIndex: "identity",
customRender: function (identity) {
switch (identity) {
case 1: return '物业'
case 2: return '业主'
case 3: return '租户'
case 4: return '业主亲属'
case 5: return '租户亲属'
default:
break;
}
}
},
{
title: "实缴金额",
dataIndex: "payAmount"
},
{
title: "支付类型",
dataIndex: "payType",
customRender:function(payType){
switch (payType) {
case 1: return '自动扣费'
case 2: return '线下支付'
case 3: return '支付宝支付'
default:
break;
}
}
},
];
export const columns = [
{
title: "账单名称",

@ -23,6 +23,19 @@
<a-cascader v-model="casVal" @change="chooseHouse" :field-names="{label: 'name', value: 'id', children: 'childList' }" :options="houseInfo" style="width: 200px" placeholder="请选择">
</a-cascader>
</a-form-model-item>
<a-form-model-item style="margin-left: 32px" label="楼栋" >
<a-select @change="changeBuilding" v-model="form.buildingId" style="width: 100px">
<a-select-option v-for="(item) in builidingList" :key="item.id" :value="item.id">{{item.name+''}}</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item style="margin-left: 32px" label="单元" >
<a-select :disabled="form.buildingId == undefined" v-model="form.unitId" style="width: 100px">
<a-select-option v-for="item in unitList" :key="item.id" :value="item.id">{{item.name+''}}</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item style="margin-left: 32px" label="楼层" >
<a-input-number v-model="form.floorNum" style="width: 100px"></a-input-number>
</a-form-model-item>
<a-form-model-item style="margin-left: 32px" label="收费标准">
<a-select v-model="chargesVal" style="width: 150px" @change="chargeChoose">
<a-select-option v-for="(item) in chargeInfo" :key="item.id" :value="item.id">
@ -31,8 +44,10 @@
</a-select>
</a-form-model-item>
</a-form-model>
<div class="btn-box"><a-button type="primary" @click="search"> </a-button>
<a-button style="margin-left: 10px" @click="resetForm"> </a-button></div>
<div class="btn-box">
<a-button type="primary" @click="search"> </a-button>
<a-button style="margin-left: 10px" @click="resetForm"> </a-button>
</div>
</div>
<!-- <searchForm :formItem="formItem" @getSearch="search($event)"></searchForm> -->
<a-table :columns="columns" :data-source="tableData" :pagination="pagination" :scroll="{x: 1900}" @change="handlerPage">
@ -116,10 +131,11 @@
</template>
<script>
import { formItem, columns, pagination } from "./depend/config"
import { formItem, columns, pagination, billColumns } from "./depend/config"
import { getBillList, abolition, recover, findBillOrderList, offlinePayments } from "@/api/payment/billManagement"
import {findEstateCascade} from "@/api/basic/estate"
import {chargesList} from "@/api/payment/chargeStandardManage"
import { findEstateCascade } from "@/api/basic/estate"
import { chargesList } from "@/api/payment/chargeStandardManage"
import { allBuilding, findByBuildingId } from "@/api/basic/estate"
export default {
name: 'payInfo',
data() {
@ -128,10 +144,15 @@ export default {
type: undefined,
estateId: undefined,
chargesIds: [],
buildingId: undefined,
unitId: undefined,
floorNum: undefined,
status: undefined,
},
casVal: [],
chargesVal: undefined,
builidingList: [],
unitList: [],
/////
tableData:[],
formItem,
@ -139,44 +160,7 @@ export default {
pagination,
billShow: false,
offShow: false,
billColumns: [
{
title: "操作人",
dataIndex: "createName"
},
{
title: "身份类型",
dataIndex: "identity",
customRender:function(identity){
switch (identity) {
case 1: return '物业'
case 2: return '业主'
case 3: return '租户'
case 4: return '业主亲属'
case 5: return '租户亲属'
default:
break;
}
}
},
{
title: "实缴金额",
dataIndex: "payAmount"
},
{
title: "支付类型",
dataIndex: "payType",
customRender:function(payType){
switch (payType) {
case 1: return '自动扣费'
case 2: return '线下支付'
case 3: return '支付宝支付'
default:
break;
}
}
},
],
billColumns: billColumns,
//
currentId: undefined,
billDetail: [],
@ -203,6 +187,10 @@ export default {
let data = res.data;
this.chargeInfo = data.rows
})
allBuilding().then(res => {
let data = res.data;
this.builidingList = data;
})
},
getData() {
let obj = Object.assign({pageNum: this.pagination.current, size: this.pagination.pageSize},this.form)
@ -242,6 +230,13 @@ export default {
changeStatus() {
this.getData();
},
//
changeBuilding(val) {
findByBuildingId({buildingId: val}).then(res => {
let data = res.data;
this.unitList = data;
})
},
//
billPay(record) {
this.currentId = record.id

@ -30,11 +30,14 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="生效日期">
<a-radio-group v-model="form.isLongTermEffective" :options="[{label:'长期生效',value:1},{label:'选择日期',value:2}]"></a-radio-group>
<a-radio-group v-model="form.isLongTermEffective" :options="[{label:'选择日期',value:2},{label:'长期生效',value:1}]"></a-radio-group>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item prop="selTime" label="选择计划日期">
<a-form-model-item v-if="form.isLongTermEffective == 1" prop="autoEffectiveDateStart" label="选择计划日期">
<a-date-picker v-model="form.autoEffectiveDateStart" value-format="YYYY-MM-DD HH:mm:ss"></a-date-picker>
</a-form-model-item>
<a-form-model-item v-else prop="selTime" label="选择计划日期">
<a-range-picker v-model="form.selTime" @change="timeChange" value-format="YYYY-MM-DD HH:mm:ss"></a-range-picker>
</a-form-model-item>
</a-col>
@ -110,9 +113,9 @@ export default {
estateIds: [],
chargesIds: [],
name: '',
isLongTermEffective: 1,
autoEffectiveDateStart: '-',
autoEffectiveDateEnd: '-',
isLongTermEffective: 2,
autoEffectiveDateStart: '',
autoEffectiveDateEnd: '',
billDateStart: 1,
billDateType: 1,
billDateNum: 0,
@ -121,6 +124,7 @@ export default {
rules: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
selTime: [{ required: true, message: "请选择时间", trigger: "blur" }],
autoEffectiveDateStart: [{ required: true, message: "请选择时间", trigger: "change" }],
},
isVisibleDrawer: false,
roomTreeData: [],

@ -30,11 +30,17 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="生效日期">
<a-radio-group v-model="form.isLongTermEffective" :options="[{label:'长期生效',value:1},{label:'选择日期',value:2}]"></a-radio-group>
<a-radio-group v-model="form.isLongTermEffective" :options="[{label:'选择日期',value:2},{label:'长期生效',value:1}]"></a-radio-group>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item prop="selTime" label="选择计划日期">
<!-- <a-form-model-item prop="selTime" label="选择计划日期">
<a-range-picker v-model="form.selTime" @change="timeChange" value-format="YYYY-MM-DD HH:mm:ss"></a-range-picker>
</a-form-model-item> -->
<a-form-model-item v-if="form.isLongTermEffective == 1" prop="autoEffectiveDateStart" label="选择计划日期">
<a-date-picker v-model="form.autoEffectiveDateStart" value-format="YYYY-MM-DD HH:mm:ss"></a-date-picker>
</a-form-model-item>
<a-form-model-item v-else prop="selTime" label="选择计划日期">
<a-range-picker v-model="form.selTime" @change="timeChange" value-format="YYYY-MM-DD HH:mm:ss"></a-range-picker>
</a-form-model-item>
</a-col>
@ -110,7 +116,7 @@ export default {
estateIds: [],
chargesIds: [],
name: '',
isLongTermEffective: 1,
isLongTermEffective: 2,
autoEffectiveDateStart: '',
autoEffectiveDateEnd: '',
billDateStart: 1,
@ -121,6 +127,7 @@ export default {
rules: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
selTime: [{ required: true, message: "请选择时间", trigger: "blur" }],
autoEffectiveDateStart: [{ required: true, message: "请选择时间", trigger: "change" }],
},
isVisibleDrawer: false,
roomTreeData: [],

@ -128,8 +128,9 @@ export const formItem = [
export const pagination = {
current: 1,
total: 0,
pageSize: 5,
pageSize: 100,
showTotal: (total) => `${total}`,
pageSizeOptions: ['10','50','100','200'],
showSizeChanger: true,
showQuickJumper: true,
}

@ -3,13 +3,37 @@
<div class="cardTitle">
<span>商品管理</span>
</div>
<searchForm :formItem="formItem" @getSearch="search($event)"></searchForm>
<!-- <searchForm :formItem="formItem" @getSearch="search($event)"></searchForm> -->
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-form-model layout="inline">
<a-form-model-item label="sku编码" >
<a-input v-model="searchForm.skuId" placeholder="请输入" style="width: 200px" ></a-input>
</a-form-model-item>
<a-form-model-item label="商品名称">
<a-input v-model="searchForm.skuName" style="width: 200px" placeholder="请输入"></a-input>
</a-form-model-item>
<a-form-model-item label="分类">
<a-cascader v-model="casVal" :options="typeData" @change="typeChange" placeholder="请选择"
:field-names="{ label: 'name', value: 'id', children: 'shopCategoryVoList' }">
</a-cascader>
</a-form-model-item>
</a-form-model>
<a-button type="primary" @click='getData'> </a-button>
<a-button @click='reset'> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 2400 }"
@change="handleTableChange"
:loading="loading"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
@ -63,6 +87,7 @@
</template>
<script>
import { cateList } from "@/api/shop/goods/cate.js";
import { columns, pagination, formItem } from "./depend/config.js";
import { shopPushList,offShelf,onShelf, isEnableRedeem} from "@/api/shop/goods/index.js";
import addForm from "./depend/form.vue";
@ -78,8 +103,13 @@ export default {
searchForm: {
skuId: undefined,
skuName: undefined,
status: undefined
categoryFirstId: undefined,
categorySecondId: undefined,
categoryThirdId: undefined,
},
loading: false,
typeData: [],
casVal: [],
columns,
goodsId:null,
pagination,
@ -89,10 +119,18 @@ export default {
};
},
mounted() {
this.getApi();
this.getData();
},
methods: {
getApi() {
cateList().then(res => {
let data = res.data;
this.typeData = data;
})
},
getData() {
this.loading = true;
shopPushList({
...this.searchForm,
pageNum: this.pagination.current,
@ -100,10 +138,18 @@ export default {
}).then((res) => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.loading = false;
});
},
search(data){
this.searchForm = data;
reset() {
this.searchForm = {
skuId: undefined,
skuName: undefined,
categoryFirstId: undefined,
categorySecondId: undefined,
categoryThirdId: undefined,
};
this.casVal = [];
this.getData()
},
selectionChoosed(data) {
@ -114,6 +160,7 @@ export default {
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.selectedRowKeys = [];
this.getData();
},
edit(id) {
@ -174,6 +221,11 @@ export default {
this.$message.error(res.msg);
}
})
},
typeChange(value) {
this.searchForm.categoryFirstId = value[0];
this.searchForm.categorySecondId = value[1];
this.searchForm.categoryThirdId = value[2];
}
},
computed: {

@ -143,8 +143,9 @@ export const formItem = [
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
pageSize: 200,
showTotal: (total) => `${total}`,
pageSizeOptions: ['10','50','100','200'],
showSizeChanger: true,
showQuickJumper: true,
}

@ -1,13 +1,55 @@
<template>
<div>
<div class="cardTitle">jcook商品库</div>
<searchForm :formItem="formItem" @getSearch="search($event)" ></searchForm>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-form-model layout="inline">
<a-form-model-item label="sku编码" >
<a-input v-model="searchForm.jcookSkuId" placeholder="请输入" style="width: 200px" ></a-input>
</a-form-model-item>
<a-form-model-item label="上架状态" >
<a-select v-model="searchForm.status" style="width: 200px">
<a-select-option :value="0">下架</a-select-option>
<a-select-option :value="1">上架</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="商品名称">
<a-input v-model="searchForm.skuName" style="width: 200px" placeholder="请输入"></a-input>
</a-form-model-item>
<a-form-model-item label="店铺名称">
<a-input v-model="searchForm.shopName" style="width: 200px" placeholder="请输入"></a-input>
</a-form-model-item>
<a-form-model-item label="供应商名称">
<a-input v-model="searchForm.vendorName" style="width: 200px" placeholder="请输入"></a-input>
</a-form-model-item>
<a-form-model-item label="品牌名称">
<a-input v-model="searchForm.brandName" style="width: 200px" placeholder="请输入"></a-input>
</a-form-model-item>
<a-form-model-item label="分类">
<a-cascader v-model="casVal" :options="typeData" @change="typeChange" placeholder="请选择"
:field-names="{ label: 'name', value: 'name', children: 'shopCategoryVoList' }">
</a-cascader>
</a-form-model-item>
<a-form-model-item>
<a-button type="primary" @click='getData'> </a-button>
</a-form-model-item>
<a-form-model-item>
<a-button @click='reset'> </a-button>
</a-form-model-item>
</a-form-model>
</a-space>
</a-col>
</a-row>
</div>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 2600 }"
@change="handleTableChange"
:loading="loading"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
@ -17,11 +59,7 @@
}
})
}"
:row-key="
(record, index) => {
return record.id;
}
"
:row-key=" (record, index) => { return record.id; } "
>
<span slot="action" slot-scope="text, row">
<a-space>
@ -59,8 +97,9 @@
</template>
<script>
import { cateList } from "@/api/shop/goods/cate.js";
import { jcookGoodsList,jcookGoodsBatchPush } from "@/api/shop/goods";
import { formItem, columns, pagination } from "./depend/config";
import { columns, pagination } from "./depend/config";
import addForm from "./depend/form.vue";
export default {
components: {
@ -79,9 +118,14 @@ export default {
shopName:'',
vendorName:'',
brandName:'',
status:undefined
},
formItem,
status:undefined,
categoryFirstName: undefined,
categorySecondName: undefined,
categoryThirdName: undefined,
},
typeData:[],
casVal:[],
loading: false,
columns,
pagination,
// index
@ -89,14 +133,18 @@ export default {
};
},
mounted() {
this.getApi();
this.getData();
},
methods: {
search(data){
this.searchForm = data;
this.getData()
getApi() {
cateList().then(res => {
let data = res.data;
this.typeData = data;
})
},
async getData() {
this.loading = true
let res = await jcookGoodsList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
@ -104,7 +152,23 @@ export default {
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
this.selectedRowKeys=[]
this.selectedRowKeys = [];
this.loading = false;
},
reset() {
this.searchForm= {
jcookSkuId:'',
skuName:'',
shopName:'',
vendorName:'',
brandName:'',
status:undefined,
categoryFirstId: undefined,
categorySecondId: undefined,
categoryThirdId: undefined,
};
this.casVal = [];
this.getData()
},
push(id) {
this.goodsId = id;
@ -147,6 +211,11 @@ export default {
success() {
this.getData();
},
typeChange(value) {
this.searchForm.categoryFirstName = value[0];
this.searchForm.categorySecondName = value[1];
this.searchForm.categoryThirdName = value[2];
}
},
computed: {
hasSelected() {

Binary file not shown.
Loading…
Cancel
Save