完善wms
This commit is contained in:
@@ -5,13 +5,6 @@ ENV = 'development'
|
||||
VUE_APP_BASE_API = '/api'
|
||||
|
||||
## 配置测试和本地开发时的 接口地址
|
||||
# VUE_APP_URL = "http://jianguan.yyundong.com/shgfapi"
|
||||
|
||||
## wms
|
||||
VUE_APP_URL = "http://127.0.0.1:4523/m1/4061550-0-default"
|
||||
## 安瑞
|
||||
##VUE_APP_URL = "http://127.0.0.1:4523/m1/613533-0-default"
|
||||
##VUE_APP_URL = "http://192.168.2.117:7301"
|
||||
##VUE_APP_REPORT_URL = "https://lpk.yyundong.com"
|
||||
##VUE_APP_REPORT_URL = "https://supervise.yxtsoft.com/wms"
|
||||
##VUE_APP_URL = "https://supervise.yxtsoft.com"
|
||||
##VUE_APP_URL = "http://192.168.1.47:8111"
|
||||
VUE_APP_URL = "https://wms.yxtsoft.com"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
"core-js": "^3.8.3",
|
||||
"echarts": "^5.4.3",
|
||||
"ejs": "^2.7.4",
|
||||
"element-china-area-data": "^6.1.0",
|
||||
"element-ui": "^2.15.14",
|
||||
"js-cookie": "2.2.0",
|
||||
"moment": "^2.29.1",
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsbrand/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 类别查询
|
||||
getAllBrand: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsbrand/listAll',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 修改是否可用状态
|
||||
updateIsEnable: function(sid,isEnable) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsbrand/updateIsEnable/'+sid+"/"+isEnable
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 新增、保存
|
||||
saveBrands: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsbrand/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 初始化
|
||||
initBrands: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsbrand/initialization/' + data,
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodstype/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 类别查询
|
||||
getAllType: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodstype/listAll',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 修改是否可用状态
|
||||
updateIsEnable: function(sid, isEnable) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodstype/updateIsEnable/' + sid + "/" + isEnable
|
||||
});
|
||||
},
|
||||
|
||||
// 修改是否一品一码
|
||||
updateIsGoodsID: function(sid, isGoodsID) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodstype/updateIsGoodsID/' + sid + "/" + isGoodsID
|
||||
});
|
||||
},
|
||||
|
||||
// 新增、保存
|
||||
saveTypes: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodstype/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 初始化
|
||||
initTypes: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodstype/initialization/' + data,
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basemanufacturer/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 厂家查询
|
||||
getAllFacturer: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basemanufacturer/listAll',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
// 修改是否可用状态
|
||||
updateIsEnable: function(sid,isEnable) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basemanufacturer/updateIsEnable/'+sid+"/"+isEnable
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 新增、保存
|
||||
saveFacturer: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basemanufacturer/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 初始化
|
||||
initFacturer: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basemanufacturer/initialization/' + data,
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsspu/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 修改是否可用状态
|
||||
updateIsEnable: function(sid, isEnable) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsspu/updateIsEnable/' + sid + "/" + isEnable
|
||||
});
|
||||
},
|
||||
|
||||
// 新增、保存
|
||||
saveGoods: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsspu/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 初始化
|
||||
initGoods: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsspu/initialization/' + data,
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
46
src/api/baseinfo/supplier/supplier.js
Normal file
46
src/api/baseinfo/supplier/supplier.js
Normal file
@@ -0,0 +1,46 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
// 列表查询
|
||||
listPage: function(data) {
|
||||
return request({
|
||||
url: '/pms/v1/pmssupplierinfo/listPage',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
// 保存
|
||||
saveOrUpdate: function(data) {
|
||||
return request({
|
||||
url: '/pms/v1/pmssupplierinfo/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
// 回显
|
||||
fetchDetailsBySid: function(data) {
|
||||
return request({
|
||||
url: '/pms/v1/pmssupplierinfo/fetchDetailsBySid/' + data,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
delBySids: function(data) {
|
||||
return request({
|
||||
url: '/pms/v1/pmssupplierinfo/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
// 获取供应商类型
|
||||
selSupplierType: function(data) {
|
||||
return request({
|
||||
url: '/pms/v1/pmssuppliertype/selSupplierType',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
}
|
||||
31
src/api/baseinfo/suppliertype/suppliertype.js
Normal file
31
src/api/baseinfo/suppliertype/suppliertype.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
// 列表查询
|
||||
listPage: function(data) {
|
||||
return request({
|
||||
url: '/pms/v1/pmssuppliertype/listPage',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
// 保存
|
||||
saveOrUpdate: function(data) {
|
||||
return request({
|
||||
url: '/pms/v1/pmssuppliertype/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
delBySids: function(data) {
|
||||
return request({
|
||||
url: '/pms/v1/pmssuppliertype/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsunit/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 单位查询
|
||||
getAllUnit: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsunit/listAll',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 修改是否可用状态
|
||||
updateIsEnable: function(sid,isEnable) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsunit/updateIsEnable/'+sid+"/"+isEnable
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 新增、保存
|
||||
saveUnits: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basegoodsunit/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 初始化
|
||||
initUnits: function(data) {
|
||||
return request({
|
||||
url: '/base/basegoodsunit/initialization/' + data,
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
// 查询分页列表 -- 结转记录查询
|
||||
carryForwardList: function(params) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventorysettlebill/carryForwardList',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
// 结转记录查询 -- 删除
|
||||
deleteBySids: function(data) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventorysettlebill/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
// 查询分页列表 -- 结转库存查询
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventorysettlebilldetail/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
// 结转库存查询 -- 导出
|
||||
exportExcel: function(data) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventorysettlebilldetail/exportExcel',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsAnsBill/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 详情初始化
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsAnsBill/details',
|
||||
method: 'get',
|
||||
data:data
|
||||
});
|
||||
},
|
||||
|
||||
// 收货初始化
|
||||
getInitDetails: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/WmsReceiptBill/getInitDetails',
|
||||
method: 'get',
|
||||
data:data
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 新增收货单
|
||||
save: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/WmsReceiptBill/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 确认收货单
|
||||
submit: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/WmsReceiptBill/confirm',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventory/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
saveOrUpdate: function(data) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventory/updateWmsInventory',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/riskcenter/v1/loancaseappealapply/details',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
},
|
||||
fetchBySid: function(data) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventory/init',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
},
|
||||
// 导出
|
||||
exportExcel: function(data) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventory/exportExcel',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
deleteBySids: function(data) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventory/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
saveSettlebill: function(data) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventorysettlebill/saveSettlebill',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
getBillList: function(data) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventory/getBillList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/WmsReceiptBill/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
|
||||
// 初始化
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/WmsReceiptBill/getDetailsInit',
|
||||
method: 'get',
|
||||
data:data
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 新增、保存
|
||||
save: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/WmsReceiptBill/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 确认
|
||||
submit: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/WmsReceiptBill/confirm',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
},
|
||||
|
||||
// 保存 上架单
|
||||
saveUpShelf: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsShelfBill/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
deleteBySids: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/WmsReceiptBill/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
|
||||
// 查询所有商品
|
||||
getGoodsListPage: function(params) {
|
||||
return request({
|
||||
url: '/yxtbase/apiadmin/base/basegoodssku/getGoodsListPage',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 选择供应商
|
||||
choiceSupplier: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basesupplierinfo/choiceSupplierInfo',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventory/inventoryAgeList',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
// 导出
|
||||
exportExcel: function(data) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventory/ageExportExcel',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -13,11 +13,8 @@ export function rolemenus(data) {
|
||||
// 获取左侧菜单
|
||||
export function getrolemenus(data) {
|
||||
return request({
|
||||
baseURL: '/api',
|
||||
url: '/portal/v1/sysmenu/sourcemenutree',
|
||||
url: '/wms/apiadmin/sysmenu/sourcemenutree',
|
||||
method: 'POST',
|
||||
async: false,
|
||||
// data: {userSid: data.userSid, sourceSid: '000011'},
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json',
|
||||
'token': tokens }
|
||||
|
||||
32
src/api/system/dataDict/dataDict.js
Normal file
32
src/api/system/dataDict/dataDict.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//获取单位级别
|
||||
export function getDwJb(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getDwJb',
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
||||
// 获取机构单位类别
|
||||
export function getDwType(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getDwType',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//获取机构人员类别
|
||||
export function getRylb(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getRylb',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据Type值获取数据对象
|
||||
export function getDicts(typeCode) {
|
||||
return request({
|
||||
url: '/system/dictCommon/dicts/'+typeCode,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
125
src/api/system/departments/departments.js
Normal file
125
src/api/system/departments/departments.js
Normal file
@@ -0,0 +1,125 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
// let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
||||
let tokens = window.sessionStorage.getItem('token')
|
||||
// 获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysorganization/listPage',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询左侧部门列表
|
||||
export function orgList(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysorganization/list',
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑部门信息
|
||||
export function postOrgtree(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysorganization/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取 机构分页列表(编辑部门信息)
|
||||
export function putOrgtree(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysorganization/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 新增部门信息
|
||||
export function addOrgTree(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysorganization/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 回显
|
||||
export function selectBySid(data) {
|
||||
return request({
|
||||
url: 'portal/v1/sysorganization/fetchBySid/' + data,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 树 节点名称 删除
|
||||
export function delOrgtree(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/sysorganization/delBySid/` + data.sid,
|
||||
method: 'get',
|
||||
data: qs.stringify(data),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询主管人员 旧的:/wms/apiadmin/sysstafforg/staffinfoList
|
||||
export function getStaff(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysstaffinfo/getStaffNameByDeptSid',
|
||||
method: 'get',
|
||||
params: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询分管人员
|
||||
export function getStaffName(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysstaffinfo/getStaffName',
|
||||
method: 'get',
|
||||
params: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查看二维码
|
||||
export function getQrCode(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysorganization/getQrCode/' + data.sid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
58
src/api/system/dictType/dictCommon.js
Normal file
58
src/api/system/dictType/dictCommon.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
|
||||
//获取字典子集 分页列表
|
||||
export function dictCommonList(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/dictcommons/pageList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//保存 字典子级
|
||||
export function savedictCommon(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/dictcommons/save',
|
||||
method: 'POST',
|
||||
data: data ,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 获取单个菜单 信息
|
||||
export function getRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 修改 数据字典
|
||||
export function putdictCommon(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/dictcommons/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data ,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 删除菜单 信息
|
||||
export function deldictCommon(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/dictcommons/delete/' + data.sid,
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
74
src/api/system/dictType/index.js
Normal file
74
src/api/system/dictType/index.js
Normal file
@@ -0,0 +1,74 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token')
|
||||
|
||||
// 获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/dicttypes/pageList',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 根据sid 修改
|
||||
export function putDictType(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/dicttypes/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
// 保存 角色信息
|
||||
export function saveDictType(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/dicttypes/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
|
||||
// 根据sid 获取单个菜单 信息
|
||||
export function getRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
// 数据字段--映射管理保存
|
||||
export function saveMappingList(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysmapping/saveMappingList',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
|
||||
// 数据字段--映射管理保存
|
||||
export function selectMappingListInfo(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysmapping/selectMappingListInfo',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
|
||||
// 根据sid 删除菜单 信息
|
||||
export function delDictType(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/dicttypes/delete/' + data.sid,
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
16
src/api/system/log/index.js
Normal file
16
src/api/system/log/index.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
//获取菜单 分页列表
|
||||
export function logPageList(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/systemlog/listPage',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
109
src/api/system/menu/index.js
Normal file
109
src/api/system/menu/index.js
Normal file
@@ -0,0 +1,109 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
||||
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
|
||||
//获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysmenu/listAllVoForSource',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 新增保存 菜单信息
|
||||
export function saveMenusInfo(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysmenu/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改保存 菜单信息
|
||||
export function putMenusInfo(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysmenu/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 删除单个 资源信息
|
||||
export function delMenus(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysmenu/delBySids/' + data.sid,
|
||||
method: 'get',
|
||||
data: qs.stringify(data),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改状态
|
||||
export function IsEnable(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysmenu/updateIsEnable/' + data.sid + '/' + data.isEnable,
|
||||
method: 'POST',
|
||||
/* data: qs.stringify(data),*/
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取菜单 不分页列表
|
||||
export function roleList(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/list',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//获取菜单 分页列表
|
||||
export function menusPageList(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/pagelist',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//获取菜单 树形分页列表
|
||||
export function menusTreelist(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/treelist',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//根据sid 获取单个菜单 信息
|
||||
export function getRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
36
src/api/system/organization/organization.js
Normal file
36
src/api/system/organization/organization.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
class user{
|
||||
verifyList(data){ // 获取列表
|
||||
return request({
|
||||
url: '/system/organization/verifyList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
orgRegisterDetails(data){ // 单位注册信息详情
|
||||
return request({
|
||||
url: '/system/organization/organizationRegisterDetails/'+data.organizationSid,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
verify(data){ // 审核
|
||||
return request({
|
||||
url: '/system/organization/verify',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
// 删除机构信息
|
||||
del(data) {
|
||||
return request({
|
||||
url: '/system/organization/delete/'+data.sid,
|
||||
method: 'DELETE',
|
||||
data
|
||||
})
|
||||
}
|
||||
}
|
||||
export default new user()
|
||||
87
src/api/system/postManage/index.js
Normal file
87
src/api/system/postManage/index.js
Normal file
@@ -0,0 +1,87 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMTE1MjUwfQ.gtn_mVsbwH6ztl835rWmIY4DxeNmRe_TOt-Q0TdldIE'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
//获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/syspost/listPage',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门列表
|
||||
export function orgList(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysorganization/list',
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 新增
|
||||
export function savePost(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/syspost/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改
|
||||
export function putOrgroles(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/syspost/update/' +data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function delOrgroles(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/syspost/delBySids/' + data.sids,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function pullDown(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/dictcommons/typeValues',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询岗位列表
|
||||
export function selectList(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/syspost/selectList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询所有流程名称
|
||||
export function selectFlowList(){
|
||||
return request({
|
||||
url: '/flowable/v1/flow/selectFlowList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
198
src/api/system/roleAdminister/index.js
Normal file
198
src/api/system/roleAdminister/index.js
Normal file
@@ -0,0 +1,198 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
// 业务角色 列表
|
||||
export function roleOrgList(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysrole/listPage',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function postList(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/syspost/list',
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取数据字典下拉列表
|
||||
export function typeValues(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/dictcommons/typeValues',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 设置是否可用:isEnable:1可用,0不可用
|
||||
export function setRoleEnable(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysrole/setIsEnable/' + data.sid + '/' + data.isEnable,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* <新增 保存角色>
|
||||
* @orgSid 机构SID
|
||||
* @remarks 备注
|
||||
* @roleName 角色名称
|
||||
* */
|
||||
export function saveOrgroles(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysrole/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* <根据SID 修改角色>
|
||||
* @sid 角色SID
|
||||
* @orgSid 机构SID
|
||||
* @remarks 备注
|
||||
* @roleName 角色名称
|
||||
* */
|
||||
export function putOrgroles(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/sysrole/update/${data.sid}`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* <根据SID 删除角色>
|
||||
* @sid 角色SID
|
||||
* */
|
||||
export function delOrgroles(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/sysrole/delBySids/${data.sid}`,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 移动端授权
|
||||
export function getRoleMenuList(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysmobilemenurole/getRoleMenuList',
|
||||
method: 'post',
|
||||
params: { roleSid: data }
|
||||
})
|
||||
}
|
||||
|
||||
// 菜单授权保存
|
||||
export function saveRoleMenuList(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/sysmobilemenurole/saveRoleMenuList`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 菜单授权
|
||||
export function roleMenuTree(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/sysmenu/listAllByRoleSid`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 菜单授权保存
|
||||
export function saveorgrolemenus(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/sysrikeauthorize/updateRoleAndMenu`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 资源授权
|
||||
export function sourceMenuTree(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/syssource/listAllByRoleSid`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 资源授权保存
|
||||
export function saveSource(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/syssourcerole/updateRoleAndSource`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 功能授权
|
||||
export function funMenuTree(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/sysfunction/getFunctionAuthorization/` + data.roleSid,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 功能授权保存
|
||||
export function savefunMenu(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/sysrolefunction/updateRoleAndFunction`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 角色授权
|
||||
export function selMenuByRole(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/sysmenurole/selMenuByRole`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
|
||||
// 角色授权保存
|
||||
export function updateDataByRoleMenu(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/sysmenurole/updateDataByRoleMenu`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
31
src/api/system/roleAdminister/rolemenus.js
Normal file
31
src/api/system/roleAdminister/rolemenus.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
/**
|
||||
* < 业务角色授权时菜单列表(拥有的菜单选中)>
|
||||
* @orgTypeKeys 单位性质(类别
|
||||
* @roleSid 业务角色sid
|
||||
* @userType 用户类型只能为1或2
|
||||
* */
|
||||
export function roleMenuTree(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/orgrolemenus/menutree',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* < 保存角色授权的菜单项 >
|
||||
* @roleMenus[] 角色权限列表 {menuSid 菜单sid} {orgSid 单位sid} {roleSid 角色sid}
|
||||
* @roleSid 业务角色sid
|
||||
* */
|
||||
export function saveorgrolemenus(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/orgrolemenus',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
150
src/api/system/userManage/index.js
Normal file
150
src/api/system/userManage/index.js
Normal file
@@ -0,0 +1,150 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
// 用户列表
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
export function userList(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysuser/listPage',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 新增
|
||||
export function userAdd(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysuser/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 更新
|
||||
export function userUpdata(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysuser/update/' +data.sid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function delUser(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysuser/delBySid/' +data.sid,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化密码
|
||||
export function initPwd(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysuser/initPwd/' +data.sid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 根据sid查询一条信息
|
||||
export function userSingle(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysuser/fetchBySid/' +data.sid,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 单条用户的角色列表
|
||||
export function setRole(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysrole/listAllByUserSid/' +data.sid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 角色列表
|
||||
export function saveOrgRole(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysuserrole/update',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询角色列表
|
||||
export function roleList(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysrole/listAll',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询部门列表
|
||||
export function orgList(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysorganization/list',
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询岗位列表
|
||||
export function postList(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/syspost/fetchByOrgSid/'+data.sid,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
export function getCode(data){
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysuser/sendMessageCode/'+data.phone,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 设置是否可用:isEnable:1可用,0不可用
|
||||
export function setRoleEnable(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysuser/setIsEnable/' + data.sid + '/' + data.isEnable,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsShelfBill/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 初始化
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsShelfBill/details',
|
||||
method: 'get',
|
||||
data:data
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 新增、保存
|
||||
save: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsShelfBill/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
deleteBySids: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsShelfBill/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
@@ -8,36 +8,72 @@ export function doLogin(data) {
|
||||
url: '/wms/apiadmin/sysuser/login',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取登录人员信息
|
||||
export function getUserById(sid) {
|
||||
return request({
|
||||
url: '/cyf/sys/getUserById/' + sid
|
||||
})
|
||||
|
||||
}
|
||||
// 登录
|
||||
export function login(data) {
|
||||
// 注册发送验证码
|
||||
export function registerSendMessageCode(code) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/login',
|
||||
url: '/wms/apiadmin/sysuser/sendMessageCode/?mobile=' + code,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 用户注册
|
||||
export function registUser(data) {
|
||||
return request({
|
||||
url: '/system/user/save',
|
||||
url: '/wms/apiadmin/sysuser/register',
|
||||
method: 'post',
|
||||
data,
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded;' }
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 绑定企业/组织
|
||||
export function bindOrganization(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysuser/bindOrganization',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 选择企业/组织sid
|
||||
export function selOrganization(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysuser/selOrganization',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取登录人员信息
|
||||
export function getUserById(sid) {
|
||||
return request({
|
||||
url: '/cyf/sys/getUserById/' + sid
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 获取手机验证码
|
||||
export function getVerificationCode(data) {
|
||||
return request({
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 新增、保存
|
||||
save: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 初始化
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/' + data,
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 查询所有商品
|
||||
getGoods: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventory/alloGoodsListPage',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
|
||||
// 查询所有仓库
|
||||
getWarehouses: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/wmswarehouseinfo/selectAll',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 根据仓库查询库位
|
||||
getWarehouseareas: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/wmswarehousearea/selectAll',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsDistributeBill/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 初始化
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsDistributeBill/details',
|
||||
method: 'get',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 新增、保存
|
||||
save: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsDistributeBill/saveOrUpdateBill',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 确认
|
||||
submit: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsDistributeBill/confirm',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
deleteBySids: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsShelfBill/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventoryrecord/pageList',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出报表
|
||||
exportExcel: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventoryrecord/exportExcel',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 选择供应商
|
||||
choiceSupplier: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basesupplierinfo/choiceSupplierInfo',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 查询所有仓库
|
||||
getWarehouses: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/wmswarehouseinfo/selectAll',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
// 根据仓库查询库位
|
||||
getWarehouseareas: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/wmswarehousearea/selectAll',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
},
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventorybill/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 选择商品列表
|
||||
getAllGoods: function(params) {
|
||||
return request({
|
||||
url: '/base/basegoodssku/getSelectList',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/apiadmin/inventory/wmsinventory/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventoryrecord/getWmsInventoryRecordList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
},
|
||||
// 导出
|
||||
exportExcel: function(data) {
|
||||
return request({
|
||||
url: '/inventory/wmsinventory/exportExcel',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 选择供应商
|
||||
choiceSupplier: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basesupplierinfo/choiceSupplierInfo',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 查询所有仓库
|
||||
getWarehouses: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/wmswarehouseinfo/selectAll',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
// 根据仓库查询库位
|
||||
getWarehouseareas: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/wmswarehousearea/selectAll',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/as/v1/asoldparthandleapply/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 初始化
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/as/v1/asoldparthandleapply/fetchDetailsBySid/' + data,
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 新增、保存
|
||||
save: function(data) {
|
||||
return request({
|
||||
url: '/as/v1/asoldparthandleapply/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 提交
|
||||
submit: function(data) {
|
||||
return request({
|
||||
url: '/as/v1/asoldparthandleapply/submit',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
deleteBySids: function(data) {
|
||||
return request({
|
||||
url: '/as/v1/asoldparthandleapply/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询旧件分页列表
|
||||
handleGoodsListPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventory/handleGoodsListPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/as/v1/asoldpartreturnapply/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取确认结果详情
|
||||
fetchDetailsByMainSid: function(data) {
|
||||
return request({
|
||||
url: '/as/v1/asoldpartreturnconfirm/fetchDetailsByMainSid/' + data,
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 初始化
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/as/v1/asoldpartreturnapply/fetchDetailsBySid/' + data,
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 新增、保存
|
||||
save: function(data) {
|
||||
return request({
|
||||
url: '/as/v1/asoldpartreturnapply/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 提交
|
||||
submit: function(data) {
|
||||
return request({
|
||||
url: '/as/v1/asoldpartreturnapply/submit',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
deleteBySids: function(data) {
|
||||
return request({
|
||||
url: '/as/v1/asoldpartreturnapply/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 下载模板
|
||||
downloadExcel: function() {
|
||||
return request({
|
||||
url: '/as/v1/asoldpartreturnapply/downloadModPriceExcel',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOldInventory/recordList',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
// 导出报表
|
||||
exportExcel: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOldInventory/excelRecordList',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 选择厂家
|
||||
choiceManufacturer: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basemanufacturer/listAll',
|
||||
method: 'get',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 查询所有仓库
|
||||
getWarehouses: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/wmswarehouseinfo/selectAll',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
// 根据仓库查询库位
|
||||
getWarehouseareas: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/wmswarehousearea/selectAll',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOldInventory/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取旧件入库详情
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOldInventory/getInit',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
},
|
||||
|
||||
// 保存旧件入库
|
||||
save: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOldInventory/saveInventory',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOldInventory/oldPageList',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取旧件出入库记录详情
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOldInventory/getDetailsList',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
deleteBySids: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOldInventory/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出报表
|
||||
exportExcel: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOldInventory/excelList',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 选择厂家
|
||||
choiceManufacturer: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/basemanufacturer/listAll',
|
||||
method: 'get',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 查询所有仓库
|
||||
getWarehouses: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/wmswarehouseinfo/selectAll',
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
// 根据仓库查询库位
|
||||
getWarehouseareas: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/base/wmswarehousearea/selectAll',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/as/v1/AsBusrepairBill/pageBillList',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取维修工单详情
|
||||
getOneByBillNo: function(data) {
|
||||
return request({
|
||||
url: '/as/v1/AsBusrepairBill/getOneByBillNo',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 保存旧件回收登记
|
||||
save: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOldRegister/saveorUpdateOldRegister',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOutBill/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 详情初始化
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOutBill/details',
|
||||
method: 'get',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 初始配货单
|
||||
initDistribution: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsDistributeBill/getInit',
|
||||
method: 'get',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 新增、保存
|
||||
save: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOutBill/saveOrUpdateOutBill',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 确认
|
||||
submit: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOutBill/confirm',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
// 新增、保存 配货单
|
||||
saveDistribution: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsDistributeBill/saveOrUpdateBill',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
deleteBySids: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsShelfBill/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询分页列表
|
||||
getGoodsListPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/WmsOutBill/getInventoryList',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/warereservation/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
|
||||
// 查询分页列表
|
||||
selByReservationSid: function(sid) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/warereservadetail/selByReservationSid/'+sid,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventorycheckbill/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
},
|
||||
// 新增、保存
|
||||
save: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventorycheckbill/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 初始化
|
||||
init: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventorycheckbill/' + data,
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
// 查询所有商品
|
||||
getWarehousesGoods: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventory/invenGoodsListPage',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
|
||||
// 盘点
|
||||
inven: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/inventory/wmsinventory/invenGoodsListPage',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
}
|
||||
BIN
src/assets/images/company_icon.png
Normal file
BIN
src/assets/images/company_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/images/experience.png
Normal file
BIN
src/assets/images/experience.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/assets/images/formal.png
Normal file
BIN
src/assets/images/formal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
src/assets/images/overdue.png
Normal file
BIN
src/assets/images/overdue.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
@@ -1,15 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="navbar">
|
||||
<p class="breadcrumb-container"><img src="@/assets/loginImg/logo.png" style="width: 105px;height: 35px;margin-right: 20px;"/>商享通WMS</p>
|
||||
<!-- <h3 class="breadcrumb-container">汇融银行供应链贷后监管平台</h3> -->
|
||||
<p class="breadcrumb-container"><img src="@/assets/loginImg/logo.png"
|
||||
style="width: 105px;height: 35px;margin-right: 20px;" />商享通WMS</p>
|
||||
<!-- <h3 class="breadcrumb-container">汇融银行供应链贷后监管平台</h3> -->
|
||||
<div class="right-menu">
|
||||
<!-- <p>{{Orgname}} {{departmentName}} 欢迎, {{name}}</p>-->
|
||||
<!-- <p>欢迎您,{{name}}</p>
|
||||
<p class="dy" @click="logout()"><img src="@/assets/images/dy.png"></p> -->
|
||||
<!-- <p>{{Orgname}} {{departmentName}} 欢迎, {{name}}</p>-->
|
||||
<p>{{Orgname}},欢迎您:{{pNameAndDepartmentNameAndPostName}} {{name}}</p>
|
||||
<!-- <img src="@/assets/images/info.png"> -->
|
||||
<!-- <img src="@/assets/images/dy.png" @click="logout"> -->
|
||||
<span class="backToHome" @click="logout"><i class="el-icon-back"></i>退出登录</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-footer class="footer" height="40px">Copyright © {{ year }} 商享通WMS All Rights Reserved</el-footer>
|
||||
<el-footer class="footer" height="40px">Copyright © {{ year }} 商享通 All Rights Reserved</el-footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -17,12 +20,18 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Orgname: '',
|
||||
departmentName: '',
|
||||
name: '',
|
||||
year:'',
|
||||
year: '',
|
||||
pNameAndDepartmentNameAndPostName: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.Orgname = window.sessionStorage.getItem('orgName')
|
||||
this.departmentName = window.sessionStorage.getItem('departmentName')
|
||||
this.name = window.sessionStorage.getItem('userName')
|
||||
this.pNameAndDepartmentNameAndPostName = window.sessionStorage.getItem('defaultOrgPathName')
|
||||
var nowDate = new Date()
|
||||
this.year = nowDate.getFullYear()
|
||||
},
|
||||
@@ -33,11 +42,14 @@
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// this.$store.commit('user/SET_UESRINFO', '')
|
||||
this.$router.push({
|
||||
path: '/login'
|
||||
})
|
||||
})
|
||||
window.sessionStorage.clear()
|
||||
this.$router.push({
|
||||
path: '/login'
|
||||
})
|
||||
location.reload()
|
||||
// this.$store.commit('user/SET_UESRINFO', '')
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -67,15 +79,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
.breadcrumb-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 26px;
|
||||
line-height: 60px;
|
||||
margin: 0;
|
||||
float: left;
|
||||
}
|
||||
.breadcrumb-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 26px;
|
||||
line-height: 60px;
|
||||
margin: 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.right-menu {
|
||||
float: right;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div :class="{ 'has-logo': showLogo }">
|
||||
<div :class="{'has-logo':showLogo}">
|
||||
<logo v-if="showLogo" :collapse="isCollapse" />
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-menu :default-active="$route.path" :background-color="variables.menuBg" :text-color="variables.menuText"
|
||||
<el-menu :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText"
|
||||
:unique-opened="false" :active-text-color="variables.menuActiveText" :collapse-transition="false"
|
||||
mode="vertical">
|
||||
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" />
|
||||
@@ -20,13 +20,7 @@
|
||||
import variables from '@/styles/variables.scss'
|
||||
import {
|
||||
getrolemenus,
|
||||
loginDetails
|
||||
} from '@/api/system/Role/role.js'
|
||||
import {
|
||||
getStorage
|
||||
} from '@/utils/auth'
|
||||
import Layout from '@/layout'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SidebarItem,
|
||||
@@ -35,680 +29,34 @@
|
||||
data() {
|
||||
return {
|
||||
YongHuid: [],
|
||||
// routes: [],
|
||||
routes: [],
|
||||
params: {
|
||||
sourceSid: '',
|
||||
userSid: ''
|
||||
},
|
||||
routes: [{
|
||||
alwaysShow: true,
|
||||
component: 'baseInfo',
|
||||
meta: {
|
||||
icon: 'el-icon-notebook-1',
|
||||
title: '基础信息'
|
||||
},
|
||||
name: '/baseInfo',
|
||||
path: '/baseInfo',
|
||||
children: [{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '仓库设置'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands',
|
||||
children: [
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '仓库管理'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '库区管理'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '货架管理'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '供应商管理'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
|
||||
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'brands',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '品牌管理'
|
||||
// },
|
||||
// name: '/baseInfo/brands',
|
||||
// path: '/baseInfo/brands'
|
||||
// }, {
|
||||
// alwaysShow: true,
|
||||
// component: 'category',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '类别管理'
|
||||
// },
|
||||
// name: '/baseInfo/category',
|
||||
// path: '/baseInfo/category'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'unit',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '单位管理'
|
||||
// },
|
||||
// name: '/baseInfo/unit',
|
||||
// path: '/baseInfo/unit'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'factory',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '厂家管理'
|
||||
// },
|
||||
// name: '/baseInfo/factory',
|
||||
// path: '/baseInfo/factory'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'goods',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '商品管理'
|
||||
// },
|
||||
// name: '/baseInfo/goods',
|
||||
// path: '/baseInfo/goods'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'warehouse',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '仓库管理'
|
||||
// },
|
||||
// name: '/baseInfo/warehouse',
|
||||
// path: '/baseInfo/warehouse'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'warehouseArea',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '库区管理'
|
||||
// },
|
||||
// name: '/baseInfo/warehouseArea',
|
||||
// path: '/baseInfo/warehouseArea'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'warehouseAreaType',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '库区类型管理'
|
||||
// },
|
||||
// name: '/baseInfo/warehouseAreaType',
|
||||
// path: '/baseInfo/warehouseAreaType'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'goodsShelves',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '库位管理'
|
||||
// },
|
||||
// name: '/baseInfo/goodsShelves',
|
||||
// path: '/baseInfo/goodsShelves'
|
||||
// }
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'goods',
|
||||
meta: {
|
||||
icon: 'el-icon-coin',
|
||||
title: '商品管理'
|
||||
},
|
||||
name: '/goods',
|
||||
path: '/goods',
|
||||
children: [
|
||||
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '商品管理'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '商品类别'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '商品品牌'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'goods',
|
||||
meta: {
|
||||
icon: 'el-icon-truck',
|
||||
title: '入库管理'
|
||||
},
|
||||
name: '/goods',
|
||||
path: '/goods',
|
||||
children: [
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '入库预约'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '采购入库'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '收货入库'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '销退预约'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '销退入库'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'goods',
|
||||
meta: {
|
||||
icon: 'el-icon-shopping-cart-full',
|
||||
title: '出库管理'
|
||||
},
|
||||
name: '/goods',
|
||||
path: '/goods',
|
||||
children: [
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '出库管理'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'goods',
|
||||
meta: {
|
||||
icon: 'el-icon-takeaway-box',
|
||||
title: '库存管理'
|
||||
},
|
||||
name: '/goods',
|
||||
path: '/goods',
|
||||
children: [
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '盘点管理'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '库存查询'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands',
|
||||
children: [
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '库存总量'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '库存警戒线'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'goods',
|
||||
meta: {
|
||||
icon: 'el-icon-bank-card',
|
||||
title: '财务记账'
|
||||
},
|
||||
name: '/goods',
|
||||
path: '/goods',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'goods',
|
||||
meta: {
|
||||
icon: 'el-icon-data-line',
|
||||
title: '报表查询'
|
||||
},
|
||||
name: '/goods',
|
||||
path: '/goods',
|
||||
children: [
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '出入库查询'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'goods',
|
||||
meta: {
|
||||
icon: 'el-icon-setting',
|
||||
title: '系统管理'
|
||||
},
|
||||
name: '/goods',
|
||||
path: '/goods',
|
||||
children: [
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '用户管理'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '角色管理'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '安全设置'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: 'brands',
|
||||
meta: {
|
||||
title: '日志管理'
|
||||
},
|
||||
name: '/baseInfo/brands',
|
||||
path: '/baseInfo/brands'
|
||||
},
|
||||
]
|
||||
},
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'warehouse',
|
||||
// meta: {
|
||||
// icon: 'el-icon-menu',
|
||||
// title: '仓库信息'
|
||||
// },
|
||||
// name: '/warehouse',
|
||||
// path: '/warehouse',
|
||||
// children: [
|
||||
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'inStorage',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '入库管理'
|
||||
// },
|
||||
// name: '/warehouse/inStorage',
|
||||
// path: '/warehouse/inStorage'
|
||||
// },
|
||||
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'reservationInStorage',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '预约入库'
|
||||
// },
|
||||
// name: '/warehouse/reservationInStorage',
|
||||
// path: '/warehouse/reservationInStorage'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'outStorage',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '出库管理'
|
||||
// },
|
||||
// name: '/warehouse/outStorage',
|
||||
// path: '/warehouse/outStorage'
|
||||
// },
|
||||
// // {
|
||||
// // alwaysShow: true,
|
||||
// // component: 'distribution',
|
||||
// // meta: {
|
||||
// // icon: 'el-icon-help',
|
||||
// // title: '配货管理'
|
||||
// // },
|
||||
// // name: '/warehouse/distribution',
|
||||
// // path: '/warehouse/distribution'
|
||||
// // },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'inventory',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '库存查询'
|
||||
// },
|
||||
// name: '/warehouse/inventory',
|
||||
// path: '/warehouse/inventory'
|
||||
// }, {
|
||||
// alwaysShow: true,
|
||||
// component: 'inOutStorage',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '出入库查询'
|
||||
// },
|
||||
// name: '/warehouse/inOutStorage',
|
||||
// path: '/warehouse/inOutStorage'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'stocktaking',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '盘点管理'
|
||||
// },
|
||||
// name: '/warehouse/stocktaking',
|
||||
// path: '/warehouse/stocktaking'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'allocation',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '调拨管理'
|
||||
// },
|
||||
// name: '/warehouse/allocation',
|
||||
// path: '/warehouse/allocation'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'deliveryNotice',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '到货单管理'
|
||||
// },
|
||||
// name: '/warehouse/deliveryNotice',
|
||||
// path: '/warehouse/deliveryNotice'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'receivingGoods',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '收货单管理'
|
||||
// },
|
||||
// name: '/warehouse/receivingGoods',
|
||||
// path: '/warehouse/receivingGoods'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'upShelf',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '上架单管理'
|
||||
// },
|
||||
// name: '/warehouse/upShelf',
|
||||
// path: '/warehouse/upShelf'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'oldPartsFactory',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '旧件返厂'
|
||||
// },
|
||||
// name: '/warehouse/oldPartsFactory',
|
||||
// path: '/warehouse/oldPartsFactory'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'oldPartsCope',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '旧件处理'
|
||||
// },
|
||||
// name: '/warehouse/oldPartsCope',
|
||||
// path: '/warehouse/oldPartsCope'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'oldPartsRecovery',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '旧件回收'
|
||||
// },
|
||||
// name: '/warehouse/oldPartsRecovery',
|
||||
// path: '/warehouse/oldPartsRecovery'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'oldPartsInStorage',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '旧件入库'
|
||||
// },
|
||||
// name: '/warehouse/oldPartsInStorage',
|
||||
// path: '/warehouse/oldPartsInStorage'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'oldPartsInvertory',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '旧件库存'
|
||||
// },
|
||||
// name: '/warehouse/oldPartsInvertory',
|
||||
// path: '/warehouse/oldPartsInvertory'
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: 'oldPartsInAndOutStorage',
|
||||
// meta: {
|
||||
// icon: 'el-icon-help',
|
||||
// title: '旧件出入库查询'
|
||||
// },
|
||||
// name: '/warehouse/oldPartsInAndOutStorage',
|
||||
// path: '/warehouse/oldPartsInAndOutStorage'
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
|
||||
|
||||
// {
|
||||
// path: '/inventory',
|
||||
// component: Layout,
|
||||
// redirect: '/inventory',
|
||||
// meta: {
|
||||
// title: '库存查询'
|
||||
// },
|
||||
// children: [{
|
||||
// path: '/inventory/inventory',
|
||||
// component: () => import('@/views/inventory/inventory.vue'),
|
||||
// name: 'Inventory',
|
||||
// meta: {
|
||||
// title: '库存查询',
|
||||
// noCache: true
|
||||
// }
|
||||
// }]
|
||||
// },
|
||||
// {
|
||||
// path: '/storageage',
|
||||
// component: Layout,
|
||||
// redirect: '/storageage',
|
||||
// meta: {
|
||||
// title: '库龄查询'
|
||||
// },
|
||||
// children: [{
|
||||
// path: '/storageage/storageage',
|
||||
// component: () => import('@/views/storageage/storageage.vue'),
|
||||
// name: 'StorageAge',
|
||||
// meta: {
|
||||
// title: '库龄查询',
|
||||
// noCache: true
|
||||
// }
|
||||
// }]
|
||||
// },
|
||||
// {
|
||||
// path: '/carryover',
|
||||
// component: Layout,
|
||||
// redirect: '/carryover',
|
||||
// meta: {
|
||||
// title: '结转查询'
|
||||
// },
|
||||
// children: [{
|
||||
// path: '/carryover/carryforwardrecord',
|
||||
// component: () => import('@/views/carryover/carryforwardrecord.vue'),
|
||||
// name: 'CarryForwardRecord',
|
||||
// meta: {
|
||||
// title: '结转记录查询',
|
||||
// noCache: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: '/carryover/carryoverstock',
|
||||
// component: () => import('@/views/carryover/carryoverstock.vue'),
|
||||
// name: 'CarryoverStock',
|
||||
// meta: {
|
||||
// title: '结转库存查询',
|
||||
// noCache: true
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
]
|
||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33', // wms 资源sid
|
||||
orgSid: window.sessionStorage.getItem('orgSid'),
|
||||
userSid: window.sessionStorage.getItem('sid')
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['sidebar']),
|
||||
...mapGetters([
|
||||
'sidebar'
|
||||
]),
|
||||
// routes() {
|
||||
// f4d2e507-c4ed-451c-b364-04c08f962045
|
||||
// df3e44ae-412e-4b02-b9e4-6893dbf5f83b
|
||||
// console.log('78979789', this.$router.options.routes)
|
||||
// return this.$router.options.routes
|
||||
// },
|
||||
activeMenu() {
|
||||
// const route = this.$route
|
||||
// const {
|
||||
// meta,
|
||||
// path
|
||||
// } = route
|
||||
// // if set path, the sidebar will highlight the path you set
|
||||
// if (meta.activeMenu) {
|
||||
// return meta.activeMenu
|
||||
// }
|
||||
return '/index'
|
||||
const route = this.$route
|
||||
const {
|
||||
meta,
|
||||
path
|
||||
} = route
|
||||
// if set path, the sidebar will highlight the path you set
|
||||
if (meta.activeMenu) {
|
||||
return meta.activeMenu
|
||||
}
|
||||
return path
|
||||
},
|
||||
showLogo() {
|
||||
return this.$store.state.settings.sidebarLogo
|
||||
@@ -726,25 +74,15 @@
|
||||
methods: {
|
||||
// 获取用户信息
|
||||
postHuoquyonghu() {
|
||||
// var token = getStorage()
|
||||
// loginDetails(token).then((response) => {
|
||||
// console.log('resss', response)
|
||||
// if (response.code === '200') {
|
||||
// this.YongHuid = response.data
|
||||
// this.params.userSid = this.YongHuid.sid
|
||||
// getrolemenus(this.params).then((res) => {
|
||||
// const userRoles = this.resRouter(res.data)
|
||||
this.routes.push({
|
||||
path: '*',
|
||||
redirect: '/404',
|
||||
hidden: true
|
||||
getrolemenus(this.params).then((res) => {
|
||||
const userRoles = this.resRouter(res.data)
|
||||
userRoles.push({
|
||||
path: '*',
|
||||
redirect: '/404',
|
||||
hidden: true
|
||||
})
|
||||
return userRoles
|
||||
})
|
||||
console.log('左侧菜单', this.routes)
|
||||
return this.routes
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
|
||||
},
|
||||
resRouter(menus) {
|
||||
// 递归,将后台传来数组
|
||||
@@ -757,10 +95,9 @@
|
||||
delete menus[i].redirect
|
||||
}
|
||||
if (menus[i].component == '') {
|
||||
console.log('55555', menus[i])
|
||||
menus[i] = {
|
||||
path: menus[i].path,
|
||||
component: '',
|
||||
component: Layout,
|
||||
redirect: menus[i].path,
|
||||
children: [menus[i]]
|
||||
}
|
||||
|
||||
@@ -48,67 +48,7 @@ export const constantRoutes = [
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/inventory',
|
||||
component: Layout,
|
||||
redirect: '/inventory',
|
||||
meta: {
|
||||
title: '库存查询'
|
||||
},
|
||||
children: [{
|
||||
path: '/inventory/inventory',
|
||||
component: () => import('@/views/inventory/inventory.vue'),
|
||||
name: 'Inventory',
|
||||
meta: {
|
||||
title: '库存查询',
|
||||
noCache: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/storageage',
|
||||
component: Layout,
|
||||
redirect: '/storageage',
|
||||
meta: {
|
||||
title: '库龄查询'
|
||||
},
|
||||
children: [{
|
||||
path: '/storageage/storageage',
|
||||
component: () => import('@/views/storageage/storageage.vue'),
|
||||
name: 'StorageAge',
|
||||
meta: {
|
||||
title: '库龄查询',
|
||||
noCache: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/carryover',
|
||||
component: Layout,
|
||||
redirect: '/carryover',
|
||||
meta: {
|
||||
title: '结转查询'
|
||||
},
|
||||
children: [{
|
||||
path: '/carryover/carryforwardrecord',
|
||||
component: () => import('@/views/carryover/carryforwardrecord.vue'),
|
||||
name: 'CarryForwardRecord',
|
||||
meta: {
|
||||
title: '结转记录查询',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/carryover/carryoverstock',
|
||||
component: () => import('@/views/carryover/carryoverstock.vue'),
|
||||
name: 'CarryoverStock',
|
||||
meta: {
|
||||
title: '结转库存查询',
|
||||
noCache: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/baseInfo',
|
||||
component: Layout,
|
||||
@@ -117,56 +57,9 @@ export const constantRoutes = [
|
||||
title: '基础信息'
|
||||
},
|
||||
children: [{
|
||||
path: 'brands',
|
||||
name: 'brands',
|
||||
component: () => import('@/views/baseInfo/brands/index'),
|
||||
meta: {
|
||||
title: '品牌管理',
|
||||
icon: 'product-list'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'category',
|
||||
name: 'category',
|
||||
component: () => import('@/views/baseInfo/category/index'),
|
||||
meta: {
|
||||
title: '类别管理',
|
||||
icon: 'product-add'
|
||||
}
|
||||
}, {
|
||||
path: 'unit',
|
||||
name: 'unit',
|
||||
component: () => import('@/views/baseInfo/unit/index'),
|
||||
meta: {
|
||||
title: '单位管理',
|
||||
icon: 'product-add'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'factory',
|
||||
name: 'factory',
|
||||
component: () => import('@/views/baseInfo/factory/index'),
|
||||
meta: {
|
||||
title: '厂家管理',
|
||||
icon: 'product-add'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'goods',
|
||||
name: 'goods',
|
||||
component: () => import('@/views/baseInfo/goods/index'),
|
||||
meta: {
|
||||
title: '商品管理',
|
||||
icon: 'product-add'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'warehouse',
|
||||
path: 'warehouses/warehouse',
|
||||
name: 'warehouse',
|
||||
component: () => import('@/views/baseInfo/warehouse/index'),
|
||||
component: () => import('@/views/baseInfo/warehouses/warehouse/index'),
|
||||
meta: {
|
||||
title: '仓库管理',
|
||||
icon: 'product-add'
|
||||
@@ -174,9 +67,9 @@ export const constantRoutes = [
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'warehouseArea',
|
||||
path: 'warehouses/warehouseArea',
|
||||
name: 'warehouseArea',
|
||||
component: () => import('@/views/baseInfo/warehouseArea/index'),
|
||||
component: () => import('@/views/baseInfo/warehouses/warehouseArea/index'),
|
||||
meta: {
|
||||
title: '库区管理',
|
||||
icon: 'product-add'
|
||||
@@ -184,9 +77,9 @@ export const constantRoutes = [
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'warehouseAreaType',
|
||||
path: 'warehouses/warehouseAreaType',
|
||||
name: 'warehouseAreaType',
|
||||
component: () => import('@/views/baseInfo/warehouseAreaType/index'),
|
||||
component: () => import('@/views/baseInfo/warehouses/warehouseAreaType/index'),
|
||||
meta: {
|
||||
title: '库区类型管理',
|
||||
icon: 'product-add'
|
||||
@@ -194,184 +87,114 @@ export const constantRoutes = [
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'goodsShelves',
|
||||
path: 'warehouses/goodsShelves',
|
||||
name: 'goodsShelves',
|
||||
component: () => import('@/views/baseInfo/goodsShelves/index'),
|
||||
component: () => import('@/views/baseInfo/warehouses/goodsShelves/index'),
|
||||
meta: {
|
||||
title: '库位管理',
|
||||
icon: 'product-add'
|
||||
},
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'supplier/supplier',
|
||||
name: 'Supplier',
|
||||
component: () => import('@/views/baseInfo/supplier/supplier/supplier'),
|
||||
meta: {
|
||||
title: '供应商管理',
|
||||
icon: 'product-add'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'supplier/suppliertype',
|
||||
name: 'Suppliertype',
|
||||
component: () => import('@/views/baseInfo/supplier/suppliertype/suppliertype'),
|
||||
meta: {
|
||||
title: '供应商类型管理',
|
||||
icon: 'product-add'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/warehouse',
|
||||
path: '/system',
|
||||
component: Layout,
|
||||
redirect: null,
|
||||
redirect: '/system',
|
||||
meta: {
|
||||
title: '库存信息'
|
||||
title: '系统设置'
|
||||
},
|
||||
children: [{
|
||||
path: 'inOutStorage',
|
||||
name: 'inOutStorage',
|
||||
component: () => import('@/views/warehouse/inOutStorage/index'),
|
||||
path: '/organizationManage/organizationManage',
|
||||
component: () =>
|
||||
import('@/views/system/organizationManage/organizationManage.vue'),
|
||||
name: 'OrganizationManage',
|
||||
meta: {
|
||||
title: '出入库查询',
|
||||
icon: 'product-add'
|
||||
icon: 'el-icon-menu',
|
||||
title: '组织管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'inStorage',
|
||||
name: 'inStorage',
|
||||
component: () => import('@/views/warehouse/inStorage/index'),
|
||||
path: '/postManage/postManage',
|
||||
component: () =>
|
||||
import('@/views/system/postManage/postManage.vue'),
|
||||
name: 'PostManage',
|
||||
meta: {
|
||||
title: '入库管理',
|
||||
icon: 'product-add'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'reservationInStorage',
|
||||
name: 'reservationInStorage',
|
||||
component: () => import('@/views/warehouse/reservationInStorage/index'),
|
||||
meta: {
|
||||
title: '预约入库',
|
||||
icon: 'product-add'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'outStorage',
|
||||
name: 'outStorage',
|
||||
component: () => import('@/views/warehouse/outStorage/index'),
|
||||
meta: {
|
||||
title: '出库管理',
|
||||
icon: 'product-add'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
// {
|
||||
// path: 'distribution',
|
||||
// name: 'distribution',
|
||||
// component: () => import('@/views/warehouse/distribution/index'),
|
||||
// meta: {
|
||||
// title: '配货管理',
|
||||
// icon: 'product-add'
|
||||
// },
|
||||
// hidden: true
|
||||
// },
|
||||
{
|
||||
path: 'inventory',
|
||||
name: 'inventory',
|
||||
component: () => import('@/views/warehouse/inventory/index'),
|
||||
meta: {
|
||||
title: '库存查询',
|
||||
icon: 'product-add'
|
||||
icon: 'el-icon-menu',
|
||||
title: '岗位管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'stocktaking',
|
||||
name: 'stocktaking',
|
||||
component: () => import('@/views/warehouse/stocktaking/index'),
|
||||
path: '/userManage/userManage',
|
||||
component: () =>
|
||||
import('@/views/system/userManage/userManage.vue'),
|
||||
name: 'UserManage',
|
||||
meta: {
|
||||
title: '盘点管理',
|
||||
icon: 'product-add'
|
||||
icon: 'el-icon-menu',
|
||||
title: '用户管理'
|
||||
}
|
||||
}, {
|
||||
path: '/roleAdminister/roleAdminister',
|
||||
component: () => import('@/views/system/roleAdminister/roleAdminister.vue'),
|
||||
name: 'RoleAdminister',
|
||||
meta: {
|
||||
icon: 'el-icon-menu',
|
||||
title: '角色管理'
|
||||
}
|
||||
}, {
|
||||
path: 'menuManage/menuManage',
|
||||
component: () => import('@/views/system/menuManage/menuManage.vue'),
|
||||
name: 'MenuManage',
|
||||
meta: {
|
||||
icon: 'el-icon-menu',
|
||||
title: '菜单管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'allocation',
|
||||
name: 'allocation',
|
||||
component: () => import('@/views/warehouse/allocation/index'),
|
||||
path: '/dictManage/dictManage',
|
||||
component: () => import('@/views/system/dictManage/dictManage.vue'),
|
||||
name: 'DictManage',
|
||||
meta: {
|
||||
title: '调拨管理',
|
||||
icon: 'product-add'
|
||||
icon: 'el-icon-menu',
|
||||
title: '数据字典'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'deliveryNotice',
|
||||
name: 'deliveryNotice',
|
||||
component: () => import('@/views/deliveryNotice/index'),
|
||||
path: '/logManage/logManage',
|
||||
component: () =>
|
||||
import('@/views/system/logManage/logManage.vue'),
|
||||
name: 'LogManage',
|
||||
meta: {
|
||||
title: '到货单管理',
|
||||
icon: 'product-add'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'receivingGoods',
|
||||
name: 'receivingGoods',
|
||||
component: () => import('@/views/receivingGoods/index'),
|
||||
meta: {
|
||||
title: '收货单管理',
|
||||
icon: 'product-add'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'upShelf',
|
||||
name: 'upShelf',
|
||||
component: () => import('@/views/upShelf/index'),
|
||||
meta: {
|
||||
title: '上架单管理',
|
||||
icon: 'product-add'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'oldPartsFactory',
|
||||
name: 'oldPartsFactory',
|
||||
component: () => import('@/views/warehouse/oldPartsFactory/index'),
|
||||
meta: {
|
||||
title: '旧件返厂',
|
||||
icon: 'product-add'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'oldPartsCope',
|
||||
name: 'oldPartsCope',
|
||||
component: () => import('@/views/warehouse/oldPartsCope/index'),
|
||||
meta: {
|
||||
title: '旧件处理',
|
||||
icon: 'product-add'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'oldPartsRecovery',
|
||||
name: 'oldPartsRecovery',
|
||||
component: () => import('@/views/warehouse/oldPartsRecovery/index'),
|
||||
meta: {
|
||||
title: '旧件回收',
|
||||
icon: 'product-add'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'oldPartsInStorage',
|
||||
name: 'oldPartsInStorage',
|
||||
component: () => import('@/views/warehouse/oldPartsInStorage/index'),
|
||||
meta: {
|
||||
title: '旧件入库',
|
||||
icon: 'product-add'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'oldPartsInvertory',
|
||||
name: 'oldPartsInvertory',
|
||||
component: () => import('@/views/warehouse/oldPartsInvertory/index'),
|
||||
meta: {
|
||||
title: '旧件库存',
|
||||
icon: 'product-add'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'oldPartsInAndOutStorage',
|
||||
name: 'oldPartsInAndOutStorage',
|
||||
component: () => import('@/views/warehouse/oldPartsInAndOutStorage/index'),
|
||||
meta: {
|
||||
title: '旧件出入库查询',
|
||||
icon: 'product-add'
|
||||
icon: 'el-icon-menu',
|
||||
title: '日志管理'
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
...codemenu,
|
||||
{
|
||||
path: '/404',
|
||||
|
||||
34
src/utils/functions.js.js
Normal file
34
src/utils/functions.js.js
Normal file
@@ -0,0 +1,34 @@
|
||||
// 封装Cookie
|
||||
// 封装三个函数
|
||||
// setCookie() -- 创建 Cookie
|
||||
// getCookie() -- 获取 Cookie
|
||||
// removeCookie() -- 删除 Cookie
|
||||
export function setCookie(name, value, iDay) { //分别代表cookie名称、cookie值、存储时间
|
||||
//首先将cookie的格式拼出来
|
||||
//document.cookie="name=value;expires=date";
|
||||
//然后name就换为name,vlaue就换为value,至于date就要算出这个日期对象
|
||||
var oDate = new Date();
|
||||
oDate.setDate(oDate.getDate() + iDay);
|
||||
document.cookie = name + "=" + value + "; expires=" + oDate;
|
||||
}
|
||||
//a=12; b=5; c=8; d=99
|
||||
export function getCookie(name) {
|
||||
//1、先给cookie做一下字符串分割,
|
||||
var arr = document.cookie.split("; "); //分割后变为数组,a=12 b=5 c=8 d=99
|
||||
//2、循环数组
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
var arr2 = arr[i].split("="); //根据“=”再次分割
|
||||
//arr2[0]——》存储的名称 abcd
|
||||
//arr2[1]——》存储的值 12 5 8 99
|
||||
if (arr2[0] == name) { //代表找到我想要的东西了
|
||||
return arr2[1];
|
||||
}
|
||||
}
|
||||
//另一种可能,用户第一次来网站,还没有cookie,所以肯定什么也找不到。所以在循环一次后就直接return 一个字符串,告诉用户什么也没找到。
|
||||
return "";
|
||||
}
|
||||
|
||||
export function removeCookie(name) {
|
||||
//name名称,再随便来个值1,后面的才是重点-1,时间过期了,所以就成为了负值
|
||||
setCookie(name, 1, -1);
|
||||
}
|
||||
@@ -1,278 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>商品信息</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-card class="box-card">
|
||||
<div class="item">
|
||||
<span class="item_text">品牌名称:</span>
|
||||
<el-input v-model="formobj.brandName" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">品牌代码:</span>
|
||||
<el-input v-model="formobj.brandCode" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">首字母大写:</span>
|
||||
<el-input v-model="formobj.letter" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">品牌备注:</span>
|
||||
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<!-- <div class="item">
|
||||
<span class="item_text">品牌故事:</span>
|
||||
<el-input v-model="formobj.brandStory" placeholder="" class="item_input" clearable />
|
||||
</div> -->
|
||||
|
||||
<!-- <div class="item" style="margin-bottom: 100px;margin-top: 100px;">
|
||||
|
||||
<div style="flex: 1;display: flex;flex-direction: row;align-items: center;">
|
||||
<span class="item_text2" >品牌Logo:</span>
|
||||
<upload ref="uploadImg2" v-model="imgList" style="margin-top: 20px;" class="item_input2" :limit="1"
|
||||
bucket="map" :class="{ hide: hideUploadBtn }" :upload-data="{ type: '0001' }" @change="backData" />
|
||||
</div>
|
||||
<div style="flex: 1;display: flex;flex-direction: row;align-items: center;">
|
||||
<span class="item_text2">专区大图:</span>
|
||||
<upload ref="uploadImg2" v-model="imgList2" style="margin-top: 20px;" class="item_input2" :limit="1"
|
||||
bucket="map" :class="{ hide: hideUploadBtn2 }" :upload-data="{ type: '0001' }" @change="backData2" />
|
||||
</div>
|
||||
|
||||
|
||||
</div> -->
|
||||
<div class="item" style="margin-bottom: 100px;margin-top: 100px;">
|
||||
<span class="item_text">品牌Logo:</span>
|
||||
<upload ref="uploadImg" v-model="imgList" style="" class="item_input" :limit="1"
|
||||
bucket="map" :class="{ hide: hideUploadBtn }" :upload-data="{ type: '0001' }" @change="backData" />
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/brands/brand.js'
|
||||
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao.vue'
|
||||
export default {
|
||||
components: {
|
||||
upload,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
imgList: [],
|
||||
imgList2: [],
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
sid: '',
|
||||
brandName: '',
|
||||
brandCode: '',
|
||||
remarks: '',
|
||||
letter: '',
|
||||
image: "",
|
||||
|
||||
},
|
||||
hideUploadBtn: false,
|
||||
hideUploadBtn2: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.initData()
|
||||
},
|
||||
methods: {
|
||||
backData(value) {
|
||||
console.log('backData》》》》', value)
|
||||
console.log('imgList', this.imgList)
|
||||
|
||||
if (this.imgList.length > 0) {
|
||||
this.formobj.image = this.imgList[0].url
|
||||
} else {
|
||||
this.formobj.image = ''
|
||||
}
|
||||
|
||||
this.hideUploadBtn = this.imgList.length != 0
|
||||
console.log('this.hideUploadBtn', this.hideUploadBtn)
|
||||
},
|
||||
backData2(value) {
|
||||
console.log('backData2》》》》', value)
|
||||
console.log('imgList2', this.imgList2)
|
||||
|
||||
if (this.imgList2.length > 0) {
|
||||
this.formobj.bigPic = this.imgList2[0].url
|
||||
} else {
|
||||
this.formobj.bigPic = ''
|
||||
}
|
||||
|
||||
this.hideUploadBtn2 = this.imgList2.length != 0
|
||||
console.log('this.hideUploadBtn2', this.hideUploadBtn2)
|
||||
},
|
||||
saveOrUpdate() {
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
||||
req.saveBrands(this.formobj)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: resp.msg
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.imgList = []
|
||||
this.imgList2 = []
|
||||
this.hideUploadBtn = true
|
||||
this.hideUploadBtn2 = true
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
brandName: '',
|
||||
brandCode: '',
|
||||
remarks: '',
|
||||
letter: '',
|
||||
image: "",
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
showAdd() {
|
||||
console.log("this.imgList", this.imgList)
|
||||
console.log("this.imgList2", this.imgList2)
|
||||
this.hideUploadBtn = this.imgList.length != 0
|
||||
this.hideUploadBtn2 = this.imgList2.length != 0
|
||||
},
|
||||
showEdit(row) {
|
||||
req.initBrands(row.sid)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
this.imgList = []
|
||||
this.imgList2 = []
|
||||
if (resp.data.image != '') {
|
||||
this.imgList.push({
|
||||
url: resp.data.image
|
||||
})
|
||||
}
|
||||
if (resp.data.bigPic != '') {
|
||||
this.imgList2.push({
|
||||
url: resp.data.bigPic
|
||||
})
|
||||
}
|
||||
|
||||
this.hideUploadBtn = this.imgList.length != 0
|
||||
this.hideUploadBtn2 = this.imgList2.length != 0
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = row
|
||||
this.imgList = []
|
||||
this.imgList2 = []
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// 隐藏上传组件
|
||||
|
||||
::v-deep .hide {
|
||||
.el-upload--picture-card {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.box-card {
|
||||
margin-left: 60px;
|
||||
margin-right: 60px;
|
||||
min-width: 70%;
|
||||
margin-top: 20px;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
||||
.item_text {
|
||||
flex: 0.8;
|
||||
font-size: 18px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.item_input {
|
||||
flex: 4;
|
||||
font-size: 16px;
|
||||
margin-left: 10px;
|
||||
margin-right: 80px;
|
||||
}
|
||||
|
||||
.item_text2 {
|
||||
flex: 1;
|
||||
font-size: 18px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
.item_input2 {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
margin-left: 10px;
|
||||
margin-right: 80px;
|
||||
}
|
||||
|
||||
.item_left_input {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.item_left_text {
|
||||
height: 30px;
|
||||
margin-left: 20px;
|
||||
line-height: 30px;
|
||||
color: #018AD2;
|
||||
padding: 0px 15px;
|
||||
border: 1.5px solid #018AD2;
|
||||
border-radius: 5px;
|
||||
|
||||
}
|
||||
|
||||
.item_right {
|
||||
flex: 1;
|
||||
justify-items: center;
|
||||
|
||||
.item_right_list_text {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.item_right_list_delect {
|
||||
color: #5E94FF;
|
||||
margin-left: 20px;
|
||||
font-size: 16px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,256 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="品牌列表" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="品牌名称">
|
||||
<el-input v-model="queryParams.params.name" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">品牌列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
|
||||
<!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
|
||||
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可用" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1"
|
||||
inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="品牌Logo" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="left" trigger="click" width="300">
|
||||
<img :src="scope.row.image" width="100%">
|
||||
<img slot="reference" :src="scope.row.image" :alt="scope.row.image"
|
||||
style="max-height: 70px;max-width: 70px; padding: 5px">
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="brandName" label="品牌名称" align="center" />
|
||||
<el-table-column prop="brandCode" label="品牌代码" align="center" />
|
||||
<el-table-column prop="letter" label="首字母大写" align="center" />
|
||||
<el-table-column prop="remarks" label="品牌备注" align="center" />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End 查询和其列表部分 -->
|
||||
<!-- 新增修改部分组件 -->
|
||||
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/brands/brand.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './brandsAdd.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
req.updateIsEnable(sid, state).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态已更新',
|
||||
showClose: true
|
||||
})
|
||||
} else { // 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -1,218 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>类别信息</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-card class="box-card">
|
||||
<div class="item">
|
||||
<span class="item_text">选择父级类别:</span>
|
||||
<el-select v-model="formobj.pname" placeholder="请选择父级类别" class="item_input" @change="selectGoodsTypeChange">
|
||||
<el-option v-for="item in goodsTypeList" :key="item.sid" :label="item.goodsTypeName" :value="item.sid" />
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">类别名称:</span>
|
||||
<el-input v-model="formobj.goodsTypeName" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">类别编码:</span>
|
||||
<el-input v-model="formobj.goodsTypeCode" placeholder="" class="item_input" clearable
|
||||
oninput="value=value.replace(/[^A-Za-z0-9]/g, '')" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">提成比例:</span>
|
||||
<el-input v-model="formobj.percentageRate" placeholder="" class="item_input" clearable
|
||||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">提成金额:</span>
|
||||
<el-input v-model="formobj.percentageAmount" placeholder="" class="item_input" clearable
|
||||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span class="item_text">类别排序:</span>
|
||||
<el-input v-model="formobj.sortNo" placeholder="" class="item_input" clearable
|
||||
oninput="value=value.replace(/[^A-Za-z0-9]/g, '')" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">类别备注:</span>
|
||||
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/category/category.js'
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
sid: '',
|
||||
goodsTypeName: '',
|
||||
goodsTypeCode: '',
|
||||
percentageRate: '',
|
||||
percentageAmount: '',
|
||||
sids: '',
|
||||
pname: '',
|
||||
sortNo: '',
|
||||
remarks: '',
|
||||
|
||||
},
|
||||
goodsTypeList: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
console.log('>>>>>>>>>initData')
|
||||
req.getAllType().then(resp => {
|
||||
this.goodsTypeList = resp.data
|
||||
})
|
||||
},
|
||||
saveOrUpdate() {
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
||||
req.saveTypes(this.formobj)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: resp.msg
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
goodsTypeName: '',
|
||||
goodsTypeCode: '',
|
||||
percentageRate: '',
|
||||
percentageAmount: '',
|
||||
sids: '',
|
||||
pname: '',
|
||||
sortNo: '',
|
||||
remarks: '',
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
showAdd() {},
|
||||
showEdit(row) {
|
||||
req.initTypes(row.sid)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = row
|
||||
})
|
||||
},
|
||||
selectGoodsTypeChange(val) {
|
||||
|
||||
const choose = this.goodsTypeList.filter((item) => item.sid == val)
|
||||
console.log('>>>>>>>>>selectGoodsTypeChange', choose)
|
||||
this.formobj.sids = choose[0].sid
|
||||
this.formobj.pName = choose[0].goodsTypeName
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// 隐藏上传组件
|
||||
|
||||
::v-deep .hide {
|
||||
.el-upload--picture-card {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.box-card {
|
||||
margin-left: 60px;
|
||||
margin-right: 60px;
|
||||
min-width: 70%;
|
||||
margin-top: 20px;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
||||
.item_text {
|
||||
flex: 0.8;
|
||||
font-size: 18px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.item_input {
|
||||
flex: 4;
|
||||
font-size: 16px;
|
||||
margin-left: 10px;
|
||||
margin-right: 80px;
|
||||
}
|
||||
|
||||
.item_left_input {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.item_left_text {
|
||||
height: 30px;
|
||||
margin-left: 20px;
|
||||
line-height: 30px;
|
||||
color: #018AD2;
|
||||
padding: 0px 15px;
|
||||
border: 1.5px solid #018AD2;
|
||||
border-radius: 5px;
|
||||
|
||||
}
|
||||
|
||||
.item_right {
|
||||
flex: 1;
|
||||
justify-items: center;
|
||||
|
||||
.item_right_list_text {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.item_right_list_delect {
|
||||
color: #5E94FF;
|
||||
margin-left: 20px;
|
||||
font-size: 16px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,285 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="类别列表" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="类别名称">
|
||||
<el-input v-model="queryParams.params.name" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
@click="dosearch"
|
||||
>查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-refresh"
|
||||
@click="resetQuery"
|
||||
>重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">类别列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
|
||||
<!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
|
||||
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可用" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1"
|
||||
inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否一品一码" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.isGoodsID" active-text="是" inactive-text="否" active-value="1"
|
||||
inactive-value="0" @change="enableChange2(scope.row.sid,scope.row.isGoodsID)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodsTypeName" label="类别名称" align="center" />
|
||||
<el-table-column prop="goodsTypeCode" label="类别编码" align="center" />
|
||||
<el-table-column prop="pname" label="上级类别" align="center" />
|
||||
<el-table-column prop="percentageRate" label="提成比例" align="center" />
|
||||
<el-table-column prop="percentageAmount" label="提成金额" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination
|
||||
v-show="dataList.length > 0"
|
||||
:total="queryParams.total"
|
||||
:page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size"
|
||||
class="pagination"
|
||||
@pagination="loadList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End 查询和其列表部分 -->
|
||||
<!-- 新增修改部分组件 -->
|
||||
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/category/category.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './categoryAdd.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
req.updateIsEnable(sid, state).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态已更新',
|
||||
showClose: true
|
||||
})
|
||||
} else { // 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
enableChange2(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
req.updateIsGoodsID(sid, state).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态已更新',
|
||||
showClose: true
|
||||
})
|
||||
} else { // 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -1,175 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>厂家信息</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-card class="box-card">
|
||||
<div class="item">
|
||||
<span class="item_text">厂家名称:</span>
|
||||
<el-input v-model="formobj.manufacturerName" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">厂家编码:</span>
|
||||
<el-input v-model="formobj.manufacturerCode" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">厂家排序:</span>
|
||||
<el-input v-model="formobj.sortNo" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">厂家备注:</span>
|
||||
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/factory/factory.js'
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
sid: '',
|
||||
manufacturerName: '',
|
||||
manufacturerCode: '',
|
||||
sortNo: '',
|
||||
remarks: ""
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
|
||||
saveOrUpdate() {
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
||||
req.saveFacturer(this.formobj)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: resp.msg
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
manufacturerName: '',
|
||||
manufacturerCode: '',
|
||||
sortNo: '',
|
||||
remarks: ""
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
showAdd() {},
|
||||
showEdit(row) {
|
||||
req.initFacturer(row.sid)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = row
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// 隐藏上传组件
|
||||
|
||||
::v-deep .hide {
|
||||
.el-upload--picture-card {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.box-card {
|
||||
margin-left: 60px;
|
||||
margin-right: 60px;
|
||||
min-width: 70%;
|
||||
margin-top: 20px;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
||||
.item_text {
|
||||
flex: 0.8;
|
||||
font-size: 18px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.item_input {
|
||||
flex: 4;
|
||||
font-size: 16px;
|
||||
margin-left: 10px;
|
||||
margin-right: 80px;
|
||||
}
|
||||
|
||||
.item_left_input {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.item_left_text {
|
||||
height: 30px;
|
||||
margin-left: 20px;
|
||||
line-height: 30px;
|
||||
color: #018AD2;
|
||||
padding: 0px 15px;
|
||||
border: 1.5px solid #018AD2;
|
||||
border-radius: 5px;
|
||||
|
||||
}
|
||||
|
||||
.item_right {
|
||||
flex: 1;
|
||||
justify-items: center;
|
||||
|
||||
.item_right_list_text {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.item_right_list_delect {
|
||||
color: #5E94FF;
|
||||
margin-left: 20px;
|
||||
font-size: 16px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,261 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="厂家列表" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="厂家名称">
|
||||
<el-input v-model="queryParams.params.name" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
@click="dosearch"
|
||||
>查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-refresh"
|
||||
@click="resetQuery"
|
||||
>重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">厂家列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
|
||||
<!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
|
||||
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可用" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1"
|
||||
inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="manufacturerName" label="厂家名称" align="center" />
|
||||
<el-table-column prop="manufacturerCode" label="厂家编码" align="center" />
|
||||
<el-table-column prop="sortNo" label="排序" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination
|
||||
v-show="dataList.length > 0"
|
||||
:total="queryParams.total"
|
||||
:page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size"
|
||||
class="pagination"
|
||||
@pagination="loadList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End 查询和其列表部分 -->
|
||||
<!-- 新增修改部分组件 -->
|
||||
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/factory/factory.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './factoryAdd.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
req.updateIsEnable(sid, state).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态已更新',
|
||||
showClose: true
|
||||
})
|
||||
} else { // 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,943 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>商品信息</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-form ref="dataForm" :model="formobj" label-position="top" label-width="190px" class="formadd">
|
||||
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
|
||||
<div>基础信息</div>
|
||||
</div>
|
||||
<el-row class="first_row">
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">商品名称</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-input v-model="formobj.goodsName" placeholder="商品名称" class="addinputw" style="width:100%" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">商品编码</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-input v-model="formobj.barCode" placeholder="商品编码" style="width: 100%;" class="addinputw" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">商品品牌</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-select v-model="formobj.brandName" placeholder="请选择商品品牌" class="addinputw" style="width: 100%;"
|
||||
@change="selectBrandChange">
|
||||
<el-option v-for="item in brandList" :key="item.sid" :label="item.brandName" :value="item.sid" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">商品类别</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-select v-model="formobj.typeName" placeholder="请选择商品类别" class="addinputw" style="width: 100%;"
|
||||
@change="selectCateChange">
|
||||
<el-option v-for="item in cateList" :key="item.sid" :label="item.goodsTypeName" :value="item.sid" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">商品厂家</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-select v-model="formobj.manufacturerName" placeholder="请选择商品厂家" class="addinputw" style="width: 100%;"
|
||||
@change="selectfacturerChange">
|
||||
<el-option v-for="item in facturerList" :key="item.sid" :label="item.manufacturerName"
|
||||
:value="item.sid" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">厂家货号</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-input v-model="formobj.factoryCode" placeholder="商品名称" style="width: 100%;" class="addinputw"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">外部编码</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-input v-model="formobj.externalCode" placeholder="外部编码" style="width: 100%;" class="addinputw"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">国标码</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-input v-model="formobj.nationalStandardCode" placeholder="国标码" style="width: 100%;" class="addinputw"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">税率</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-input v-model="formobj.taxRate" placeholder="税率" style="width: 100%;" class="addinputw" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">保质期天</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-input v-model="formobj.shelfLife" placeholder="保质期天" style="width: 100%;" class="addinputw"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">商品详细说明</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-input v-model="formobj.baseGoodsSpuDetail.goodsExplain" type="textarea" :rows="4"
|
||||
style="width: 100%;margin-bottom: 5px;;" placeholder="商品详细说明" class="addinputw" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">商品描述</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-input v-model="formobj.baseGoodsSpuDetail.goodsDescription" type="textarea" :rows="4"
|
||||
style="width: 100%;margin-bottom: 5px;;" placeholder="商品描述" class="addinputw" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-collapse v-model="activeNames" style="margin-top: 20px;">
|
||||
<el-collapse-item name="1">
|
||||
<template slot="title">
|
||||
规格列表<span class="span" @click.stop="add()">添加</span>
|
||||
</template>
|
||||
<el-table v-loading="listLoading" :data="formobj.baseGoodsSkus" border style="width: 100%;"
|
||||
:row-style="{height: '40px'}">
|
||||
<!-- <el-table-column type="selection" align="center" width="50"/> -->
|
||||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
|
||||
<el-table-column label="是否可用" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1"
|
||||
inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格代码" prop="goodsSkuCode" align="center" />
|
||||
<el-table-column label="标题" prop="title" align="center" />
|
||||
<el-table-column label="外部编码" prop="externalCode" align="center" />
|
||||
<el-table-column label="规格明细" wid align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini"
|
||||
@click="showGoodsSkuDttail(scope.row.baseGoodsSkuExtend)">查看</el-button>
|
||||
<el-button type="primary" size="mini"
|
||||
@click="editGoodsSkuDttail(scope.row.baseGoodsSkuExtend)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<el-dialog title="查看规格明细" :visible.sync="dialogVisible" :before-close="handleClose">
|
||||
<el-form ref="dataForm1" class="formadd" style="margin-top: -40px;" :model="itemInfo">
|
||||
|
||||
<el-row class="first_row">
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">最后采购价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.finalPurchasePrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">安全库存天数</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.safetyStockDays}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">是否原厂</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.isOriginalFactory}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">是否库存警戒</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.isInventoryAlert}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">库存警戒上线</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.inventoryAlertUpperLimit}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">库存警戒下线</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.inventoryAlertLowerLimit}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">成本价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.costPrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">吊牌价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.tagPrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">销售单价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.salesPrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">标准进价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.standardPurchasePrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">代理价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.agencyPrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">折扣</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.discount}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">最低零售价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.minimumSalesPrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">是否积分兑换</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.isIntegralExchange}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">积分数量</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.integralAmount}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">规格图片</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item class="trightb_item">
|
||||
<template slot-scope="scope">
|
||||
<span v-for="(item,index) in itemInfo.urls" :key="index">
|
||||
<el-popover placement="left" trigger="click" width="300">
|
||||
<img :src="item" width="100%" />
|
||||
<img slot="reference" :src="item" :alt="item"
|
||||
style="max-height: 70px;max-width: 70px; padding: 5px" />
|
||||
</el-popover>
|
||||
</span>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;">
|
||||
<el-button type="primary" style="margin-top: 20px;" @click="handleClose">关 闭</el-button>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
<el-dialog title="编辑规格明细" :visible.sync="dialogVisible2" :before-close="handleClose2">
|
||||
<el-form ref="dataForm2" class="formadd" style="margin-top: -40px;" :model="orderInfo">
|
||||
<el-row class="first_row">
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">最后采购价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.finalPurchasePrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">安全库存天数</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.safetyStockDays}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">是否原厂</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.isOriginalFactory}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">是否库存警戒</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.isInventoryAlert}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">库存警戒上线</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.inventoryAlertUpperLimit}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">库存警戒下线</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.inventoryAlertLowerLimit}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">成本价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.costPrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">吊牌价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.tagPrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">销售单价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.salesPrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">标准进价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.standardPurchasePrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">代理价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.agencyPrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">折扣</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.discount}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">最低零售价</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.minimumSalesPrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">是否积分兑换</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.isIntegralExchange}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">积分数量</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{itemInfo.integralAmount}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">规格图片</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form-item class="trightb_item">
|
||||
<upload ref="uploadImg2" v-model="imgList" style="margin-top: 20px; z-index: 1000;" class="item_input" :limit="9"
|
||||
bucket="map" :class="{ hide: false }" :upload-data="{ type: '0001' }" @change="backData" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;">
|
||||
<el-button type="primary" style="margin-top: 20px;" @click="handleClose2">确 定</el-button>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!-- <el-card class="box-card">
|
||||
<div class="item">
|
||||
<span class="item_text">选择商品品牌:</span>
|
||||
<el-select v-model="formobj.brand" placeholder="请选择商品品牌" class="item_input" @change="selectBrandChange">
|
||||
<el-option v-for="item in brandList" :key="item.sid" :label="item.brandName" :value="item.sid" />
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">选择商品类别:</span>
|
||||
<el-select v-model="formobj.typeName" placeholder="请选择商品类别" class="item_input" @change="selectCateChange">
|
||||
<el-option v-for="item in cateList" :key="item.sid" :label="item.goodsTypeName" :value="item.sid" />
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">选择商品厂家:</span>
|
||||
<el-select v-model="formobj.manufacturer" placeholder="请选择商品厂家" class="item_input"
|
||||
@change="selectfacturerChange">
|
||||
<el-option v-for="item in facturerList" :key="item.sid" :label="item.manufacturerName" :value="item.sid" />
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">商品名称:</span>
|
||||
<el-input v-model="formobj.goodsName" placeholder="商品名称" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">商品编码:</span>
|
||||
<el-input v-model="formobj.goodsCode" placeholder="商品编码" class="item_input" clearable
|
||||
oninput="value=value.replace(/[^A-Za-z0-9]/g, '')" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">商品条码:</span>
|
||||
<el-input v-model="formobj.barCode" placeholder="商品条码" class="item_input" clearable
|
||||
oninput="value=value.replace(/[^0-9]/g,'')" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">商品产地:</span>
|
||||
<el-input v-model="formobj.producer" placeholder="商品产地" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">商品单位:</span>
|
||||
<el-input v-model="formobj.unit" placeholder="商品单位" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">商品规格:</span>
|
||||
<el-input v-model="formobj.specification" placeholder="商品规格" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">商品简介:</span>
|
||||
<el-input v-model="formobj.remarks" placeholder="商品简介" class="item_input" clearable />
|
||||
</div>
|
||||
|
||||
<div class="item" style="margin-bottom: 100px;margin-top: 100px;">
|
||||
<span class="item_text">商品图片:</span>
|
||||
<upload ref="uploadImg2" v-model="imgList" style="margin-top: 20px;" class="item_input" :limit="1"
|
||||
bucket="map" :class="{ hide: hideUploadBtn }" :upload-data="{ type: '0001' }" @change="backData" />
|
||||
</div>
|
||||
|
||||
</el-card> -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/goods/goods.js'
|
||||
import req2 from '@/api/baseinfo/brands/brand.js'
|
||||
import req3 from '@/api/baseinfo/category/category.js'
|
||||
import req4 from '@/api/baseinfo/factory/factory.js'
|
||||
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao.vue'
|
||||
export default {
|
||||
components: {
|
||||
upload,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listLoading: false,
|
||||
activeNames: ['1'],
|
||||
imgList: [],
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
sid: '',
|
||||
goodsName: "",
|
||||
goodsCode: "",
|
||||
brandSid: "",
|
||||
brand: "",
|
||||
goodsTypeSid: "",
|
||||
typeName: "",
|
||||
manufacturersid: "",
|
||||
manufacturer: "",
|
||||
externalCode: '',
|
||||
factoryCode: '',
|
||||
taxRate: '',
|
||||
shelfLife: '',
|
||||
baseGoodsSpuDetail: {
|
||||
goodsExplain: "",
|
||||
goodsDescription: ""
|
||||
},
|
||||
baseGoodsSkuDtos: []
|
||||
},
|
||||
brandList: [],
|
||||
cateList: [],
|
||||
facturerList: [],
|
||||
hideUploadBtn: false,
|
||||
dialogVisible: false,
|
||||
dialogVisible2: false,
|
||||
itemInfo: {},
|
||||
orderInfo: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
req2.getAllBrand().then(resp => {
|
||||
this.brandList = resp.data
|
||||
})
|
||||
req3.getAllType().then(resp => {
|
||||
this.cateList = resp.data
|
||||
})
|
||||
req4.getAllFacturer().then(resp => {
|
||||
this.facturerList = resp.data
|
||||
})
|
||||
},
|
||||
backData(value) {
|
||||
console.log('backData》》》》', value)
|
||||
console.log('imgList', this.imgList)
|
||||
|
||||
if (this.imgList.length > 0) {
|
||||
this.formobj.picUrl = this.imgList[0].url
|
||||
} else {
|
||||
this.formobj.picUrl = ''
|
||||
}
|
||||
|
||||
this.hideUploadBtn = this.imgList.length != 0
|
||||
console.log('this.hideUploadBtn', this.hideUploadBtn)
|
||||
},
|
||||
|
||||
saveOrUpdate() {
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
||||
req.saveGoods(this.formobj)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: resp.msg
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.imgList = []
|
||||
this.hideUploadBtn = true
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
brand: "",
|
||||
brandSid: "",
|
||||
typeName: "",
|
||||
goodsTypeSid: "",
|
||||
manufacturer: "",
|
||||
manufacturerSid: "",
|
||||
goodsName: '',
|
||||
goodsCode: '',
|
||||
barcode: '',
|
||||
producer: '',
|
||||
unit: '',
|
||||
specification: '',
|
||||
remarks: '',
|
||||
baseGoodsSpuDetail: {
|
||||
goodsExplain: "",
|
||||
goodsDescription: ""
|
||||
},
|
||||
baseGoodsSku: []
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
showAdd() {},
|
||||
indexMethod(index) {
|
||||
return index + 1
|
||||
},
|
||||
showEdit(row) {
|
||||
req.initGoods(row.sid)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = row
|
||||
})
|
||||
},
|
||||
selectBrandChange(val) {
|
||||
const choose = this.brandList.filter((item) => item.sid == val)
|
||||
console.log('>>>>>>>>>selectBrandChange', choose)
|
||||
this.formobj.brandSid = choose[0].sid
|
||||
this.formobj.brandName = choose[0].brandName
|
||||
},
|
||||
selectCateChange(val) {
|
||||
const choose = this.cateList.filter((item) => item.sid == val)
|
||||
console.log('>>>>>>>>>selectCateChange', choose)
|
||||
this.formobj.goodsTypeSid = choose[0].sid
|
||||
this.formobj.typeName = choose[0].goodsTypeName
|
||||
},
|
||||
selectfacturerChange(val) {
|
||||
const choose = this.facturerList.filter((item) => item.sid == val)
|
||||
console.log('>>>>>>>>>selectfacturerChange', choose)
|
||||
this.formobj.manufacturerSid = choose[0].sid
|
||||
this.formobj.manufacturerName = choose[0].manufacturerName
|
||||
},
|
||||
|
||||
|
||||
showGoodsSkuDttail(goodsSkuDto) {
|
||||
console.log('>>>>>>>>>showGoodsSkuDttail', goodsSkuDto)
|
||||
|
||||
this.dialogVisible = true
|
||||
this.itemInfo = goodsSkuDto
|
||||
this.imgList = goodsSkuDto.urls
|
||||
},
|
||||
|
||||
editGoodsSkuDttail(goodsSkuDto) {
|
||||
console.log('>>>>>>>>>editGoodsSkuDttail', goodsSkuDto)
|
||||
|
||||
this.dialogVisible2 = true
|
||||
this.itemInfo = goodsSkuDto
|
||||
this.imgList = goodsSkuDto.urls
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
handleClose2() {
|
||||
this.dialogVisible2 = false
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// 隐藏上传组件
|
||||
|
||||
::v-deep .hide {
|
||||
.el-upload--picture-card {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.box-card {
|
||||
margin-left: 60px;
|
||||
margin-right: 60px;
|
||||
min-width: 70%;
|
||||
margin-top: 20px;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
||||
.item_text {
|
||||
flex: 0.8;
|
||||
font-size: 18px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.item_input {
|
||||
flex: 4;
|
||||
font-size: 16px;
|
||||
margin-left: 10px;
|
||||
margin-right: 80px;
|
||||
}
|
||||
|
||||
.item_left_input {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.item_left_text {
|
||||
height: 30px;
|
||||
margin-left: 20px;
|
||||
line-height: 30px;
|
||||
color: #018AD2;
|
||||
padding: 0px 15px;
|
||||
border: 1.5px solid #018AD2;
|
||||
border-radius: 5px;
|
||||
|
||||
}
|
||||
|
||||
.item_right {
|
||||
flex: 1;
|
||||
justify-items: center;
|
||||
|
||||
.item_right_list_text {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.item_right_list_delect {
|
||||
color: #5E94FF;
|
||||
margin-left: 20px;
|
||||
font-size: 16px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.trightb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.trightb_item {}
|
||||
|
||||
.span {
|
||||
margin-left: 50px;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__header {
|
||||
height: 40px;
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
text-align: left;
|
||||
color: #ffffff;
|
||||
background-color: #0294d7;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -1,289 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="商品列表" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="商品名称">
|
||||
<el-input v-model="queryParams.params.name" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit" :hidden="false">商品列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"
|
||||
@selection-change="selectionLineChangeHandle">
|
||||
<el-table-column width="50" type="selection" align="center" />
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">详情</el-button>
|
||||
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可用" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1"
|
||||
inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodsName" label="商品名称" align="center" />
|
||||
<el-table-column prop="goodsCode" label="商品编码" align="center" />
|
||||
<el-table-column prop="barCode" label="商品条码" align="center" />
|
||||
<el-table-column prop="brandName" label="商品品牌" align="center" />
|
||||
<el-table-column prop="typeName" label="商品类别" align="center" />
|
||||
<el-table-column prop="goodsUnitName" label="商品单位" align="center" />
|
||||
<el-table-column prop="manufacturerName" label="商品厂家" align="center" />
|
||||
<el-table-column prop="nationalStandardCode" label="国标码" align="center" />
|
||||
<el-table-column prop="taxRate" label="税率" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End 查询和其列表部分 -->
|
||||
<!-- 新增修改部分组件 -->
|
||||
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
|
||||
<!-- 详情部分组件 -->
|
||||
<divInfo v-show="viewState == 4" ref="divinfo" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/goods/goods.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './goodsAdd.vue'
|
||||
import divInfo from './goodsInfo.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd,
|
||||
divInfo,
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'edit',
|
||||
btnKey: 'toEdit',
|
||||
btnLabel: '编辑'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: [],
|
||||
selectionList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'toEdit':
|
||||
this.toEdit()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
selectionLineChangeHandle(val) {
|
||||
console.log("val", val);
|
||||
|
||||
this.selectionList = val
|
||||
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
toEdit() {
|
||||
|
||||
if(this.selectionList.length!=1){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: "请选择一条数据。",
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(this.selectionList[0])
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
req.updateIsEnable(sid, state).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态已更新',
|
||||
showClose: true
|
||||
})
|
||||
} else { // 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
174
src/views/baseInfo/supplier/supplier/relation/openingbank.vue
Normal file
174
src/views/baseInfo/supplier/supplier/relation/openingbank.vue
Normal file
@@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<div class="tab-header webtop">
|
||||
<div>{{ viewTitle }}</div>
|
||||
<div>
|
||||
<el-button type="primary" size="small" @click="saveOrUpdate()">保存</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="listconadd">
|
||||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
|
||||
<el-row style="border-top: 1px solid #e0e3eb">
|
||||
<el-col :span="12">
|
||||
<div class="span-sty"><span class="icon">*</span>开户银行</div>
|
||||
<el-form-item prop="bankName"><el-input class="addinputInfo addinputw" v-model="formobj.bankName" clearable placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="span-sty"><span class="icon">*</span>银行账号</div>
|
||||
<el-form-item prop="bankAccount"><el-input class="addinputInfo addinputw" v-model="formobj.bankAccount" clearable placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div class="span-sty"><span class="icon">*</span>账号名称</div>
|
||||
<el-form-item prop="accountName"><el-input class="addinputInfo addinputw" v-model="formobj.accountName" clearable placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="span-sty"><span class="icon">*</span>账号类型</div>
|
||||
<el-form-item prop="dueBankKey">
|
||||
<el-select v-model="formobj.dueBankKey" class="addinputInfo" placeholder="" @change="dueBankChange">
|
||||
<el-option v-for="item in dueBank_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="span-sty">开户行地址</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.bankAddress" clearable placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div class="span-sty">银行网点</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.bankingOutlets" clearable placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="span-sty">联行号</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.paymentLines" clearable placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div class="span-sty">swiftCode(银行代码)</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.swiftCode" clearable placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="span-sty">币种</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.currency" clearable placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { typeValues } from '@/api/system/dictType/dictCommon'
|
||||
|
||||
export default {
|
||||
name: 'OpeningBank',
|
||||
data() {
|
||||
return {
|
||||
viewTitle: '',
|
||||
viewState: 1,
|
||||
dueBank_list: [],
|
||||
formobj: {
|
||||
sid: '',
|
||||
supplierSid: '',
|
||||
bankName: '',
|
||||
bankAccount: '',
|
||||
accountName: '',
|
||||
dueBankKey: '',
|
||||
dueBankValue: '',
|
||||
bankingOutlets: '',
|
||||
bankAddress: '',
|
||||
paymentLines: '',
|
||||
swiftCode: '',
|
||||
currency: ''
|
||||
},
|
||||
index: '',
|
||||
rules: {
|
||||
bankName: [{ required: true, message: '开户银行不能为空', trigger: 'blur' }],
|
||||
bankAccount: [{ required: true, message: '银行账号不能为空', trigger: 'blur' }],
|
||||
accountName: [{ required: true, message: '账号名称不能为空', trigger: 'blur' }],
|
||||
dueBankKey: [{ required: true, message: '账号类型不能为空', trigger: 'change' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
typeValues({ type: 'dueBank' }).then((res) => {
|
||||
if (res.success) {
|
||||
this.dueBank_list = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
showAdd() {
|
||||
this.viewTitle = '【新增】开户行信息'
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form_obj'].clearValidate()
|
||||
})
|
||||
this.init()
|
||||
},
|
||||
showEdit(value, index) {
|
||||
this.viewTitle = '【编辑】开户行信息'
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form_obj'].clearValidate()
|
||||
})
|
||||
this.init()
|
||||
this.formobj = JSON.parse(JSON.stringify(value))
|
||||
this.index = index
|
||||
},
|
||||
dueBankChange(value) {
|
||||
const choose = this.dueBank_list.filter((item) => item.dictKey === value)
|
||||
if (choose !== null && choose.length > 0) {
|
||||
this.formobj.dueBankValue = choose[0].dictValue
|
||||
} else {
|
||||
this.formobj.dueBankValue = ''
|
||||
}
|
||||
},
|
||||
saveOrUpdate() {
|
||||
this.$refs['form_obj'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$emit('backData', this.formobj, this.index)
|
||||
this.handleReturn()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleReturn() {
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
supplierSid: '',
|
||||
bankName: '',
|
||||
bankAccount: '',
|
||||
accountName: '',
|
||||
dueBankKey: '',
|
||||
dueBankValue: '',
|
||||
bankingOutlets: '',
|
||||
bankAddress: '',
|
||||
paymentLines: '',
|
||||
swiftCode: '',
|
||||
currency: ''
|
||||
}
|
||||
this.index = ''
|
||||
this.$emit('doback')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.span-sty {
|
||||
width: 140px !important;
|
||||
}
|
||||
.addinputInfo {
|
||||
margin-left: 130px !important;
|
||||
}
|
||||
/deep/ .el-form-item__error {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -2,20 +2,24 @@
|
||||
<div class="app-container">
|
||||
<!--列表页面-->
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar view-title="结转记录查询" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
|
||||
<button-bar view-title="供应商管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
|
||||
<!--Start查询列表部分-->
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
|
||||
<el-form-item label="门店">
|
||||
<el-input v-model="listQuery.params.useOrgName" placeholder="" clearable/>
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="listQuery.params.supplierName" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结转日期">
|
||||
<el-date-picker v-model="listQuery.params.startDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
|
||||
<span style="padding: 0 8px">至</span>
|
||||
<el-date-picker v-model="listQuery.params.endDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
|
||||
<el-form-item label="分类">
|
||||
<el-input v-model="listQuery.params.supplierTypeName" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="办公电话">
|
||||
<el-input v-model="listQuery.params.contactTelePhone" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人">
|
||||
<el-input v-model="listQuery.params.contactName" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
@@ -26,17 +30,26 @@
|
||||
</div>
|
||||
<!--End查询列表部分-->
|
||||
<div class="listtop">
|
||||
<div class="tit">结转记录查询列表</div>
|
||||
<div class="tit">供应商列表</div>
|
||||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
|
||||
</div>
|
||||
<!--Start 主页面主要部分 -->
|
||||
<div class="">
|
||||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange">
|
||||
<el-table-column fixed type="selection" align="center" width="50"/>
|
||||
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
|
||||
<el-table-column prop="useOrgName" label="门店" align="center" />
|
||||
<el-table-column prop="createTime" label="结转日期" align="center" />
|
||||
<el-table-column prop="createByName" label="结转人" align="center" />
|
||||
<el-table-column type="selection" align="center" width="50" />
|
||||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" width="180px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
|
||||
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="supplierName" label="厂商名称" align="center" />
|
||||
<el-table-column prop="supplierTypeName" label="厂商分类" align="center" />
|
||||
<el-table-column prop="address" label="厂商通讯地址" align="center" />
|
||||
<el-table-column prop="contactTelePhone" label="厂商办公电话" align="center" />
|
||||
<el-table-column prop="contactName" label="联系人" align="center" />
|
||||
<el-table-column prop="contactMobile" label="联系电话" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<!--End 主页面主要部分-->
|
||||
@@ -48,6 +61,10 @@
|
||||
<!--End查询列表部分-->
|
||||
</div>
|
||||
</div>
|
||||
<!--新增及修改 -->
|
||||
<supplierAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList" />
|
||||
<!-- 详情 -->
|
||||
<supplierInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -55,19 +72,30 @@
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import req from '@/api/carryover/carryover'
|
||||
import req from '@/api/baseinfo/supplier/supplier.js'
|
||||
import supplierAdd from './supplierAdd'
|
||||
import supplierInfo from './supplierInfo'
|
||||
|
||||
export default {
|
||||
name: 'CarryForwardRecord',
|
||||
name: 'Supplier',
|
||||
components: {
|
||||
Pagination,
|
||||
pageye,
|
||||
ButtonBar
|
||||
ButtonBar,
|
||||
supplierAdd,
|
||||
supplierInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
btnList: [
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'danger',
|
||||
size: 'small',
|
||||
@@ -97,10 +125,10 @@ export default {
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
useOrgName: '',
|
||||
useOrgSid: ''
|
||||
supplierName: '',
|
||||
supplierTypeName: '',
|
||||
contactTelePhone: '',
|
||||
contactName: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,6 +153,9 @@ export default {
|
||||
btnHandle(btnKey) {
|
||||
console.log('XXXXXXXXXXXXXXX ' + btnKey)
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doDel':
|
||||
this.doDel()
|
||||
break
|
||||
@@ -135,12 +166,6 @@ export default {
|
||||
break
|
||||
}
|
||||
},
|
||||
// 表中序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
// 信息条数 获取点击时当前的sid
|
||||
handleSelectionChange(row) {
|
||||
const aa = []
|
||||
@@ -149,10 +174,16 @@ export default {
|
||||
})
|
||||
this.sids = aa
|
||||
},
|
||||
// 表中序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
// 查询列表信息
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
req.carryForwardList(this.listQuery).then(response => {
|
||||
req.listPage(this.listQuery).then((response) => {
|
||||
this.listLoading = false
|
||||
if (response.success) {
|
||||
this.list = response.data.records
|
||||
@@ -175,14 +206,26 @@ export default {
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
useOrgName: '',
|
||||
useOrgSid: ''
|
||||
supplierName: '',
|
||||
supplierTypeName: '',
|
||||
contactTelePhone: '',
|
||||
contactName: ''
|
||||
}
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divAdd'].showAdd()
|
||||
},
|
||||
toEdit(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divAdd'].showEdit(row)
|
||||
},
|
||||
toInfo(row) {
|
||||
this.viewState = 4
|
||||
this.$refs['divInfo'].showInfo(row)
|
||||
},
|
||||
doDel() {
|
||||
if (this.sids.length === 0) {
|
||||
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
|
||||
@@ -200,7 +243,7 @@ export default {
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteBySids(this.sids).then(resp => {
|
||||
req.delBySids(this.sids).then(resp => {
|
||||
if (resp.success) {
|
||||
this.$message({ type: 'success', message: resp.msg, showClose: true })
|
||||
}
|
||||
@@ -212,6 +255,10 @@ export default {
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 修改、编辑、详情返回列表页面
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
475
src/views/baseInfo/supplier/supplier/supplierAdd.vue
Normal file
475
src/views/baseInfo/supplier/supplier/supplierAdd.vue
Normal file
@@ -0,0 +1,475 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<div class="tab-header webtop">
|
||||
<div>{{ viewTitle }}</div>
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="listconadd">
|
||||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
|
||||
<div class="title">基本信息</div>
|
||||
<el-row style="border-top: 1px solid #e0e3eb">
|
||||
<el-col :span="8">
|
||||
<div class="span-sty"><span class="icon">*</span>供应商名称</div>
|
||||
<el-form-item prop="supplierName"><el-input class="addinputInfo addinputw" v-model="formobj.supplierName" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty"><span class="icon">*</span>供应商简称</div>
|
||||
<el-form-item prop="supplierPY"><el-input class="addinputInfo addinputw" v-model="formobj.supplierPY" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty"><span class="icon">*</span>供应商编码</div>
|
||||
<el-form-item prop="supplierCode"><el-input class="addinputInfo addinputw" v-model="formobj.supplierCode" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty"><span class="icon">*</span>供应商类型</div>
|
||||
<el-form-item prop="supplierTypeSid">
|
||||
<el-select class="addinputInfo" v-model="formobj.supplierTypeSid" filterable placeholder="" @change="supplierTypeChange">
|
||||
<el-option v-for="item in supplierType_list" :key="item.sid" :label="item.supplierTypeName" :value="item.sid"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty"><span class="icon">*</span>供应商电话</div>
|
||||
<el-form-item prop="contactTelePhone"><el-input class="addinputInfo addinputw" v-model="formobj.contactTelePhone" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">传真</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.fax" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="span-sty">详细地址</div>
|
||||
<el-form-item>
|
||||
<div class="addinputInfo" style="display: flex;flex-direction: row;justify-content: flex-start;align-items: center">
|
||||
<el-select v-model="formobj.province" filterable clearable placeholder="请选择省" style="width:160px" @change="provinceChange">
|
||||
<el-option v-for="item in province_list" :key="item.sid" :label="item.name" :value="item.name"/>
|
||||
</el-select>
|
||||
<el-select v-model="formobj.city" filterable placeholder="请选择市" style="width:160px" @change="cityChange">
|
||||
<el-option v-for="item in city_list" :key="item.sid" :label="item.name" :value="item.name"/>
|
||||
</el-select>
|
||||
<el-select v-model="formobj.county" filterable placeholder="请选择县" style="width:160px" @change="countyChange">
|
||||
<el-option v-for="item in county_list" :key="item.sid" :label="item.name" :value="item.name"/>
|
||||
</el-select>
|
||||
<el-input style="width: 30%" v-model="formobj.address" clearable placeholder=""/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">联系人</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.contactName" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">联系电话</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.contactMobile" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">邮编</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.zipCode" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">电子邮件</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.email" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">网址</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.website" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty"><span class="icon">*</span>开票公司名称</div>
|
||||
<el-form-item prop="billingCompanyName"><el-input class="addinputInfo addinputw" v-model="formobj.billingCompanyName" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">税号</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.registNum" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">法人</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.legalName" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">采购员</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.purchaser" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty"><span class="icon">*</span>开票类型</div>
|
||||
<el-form-item prop="billingTypeValue">
|
||||
<el-select class="addinputInfo" v-model="formobj.billingTypeValue" filterable placeholder="" @change="billingTypeChange">
|
||||
<el-option v-for="item in billingType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty"><span class="icon">*</span>税率</div>
|
||||
<el-form-item prop="taxRate"><el-input class="addinputInfo addinputw" @keyup.native="formobj.taxRate = getNumber(formobj.taxRate, 2)" v-model="formobj.taxRate" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="span-sty">备注</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable placeholder=""/></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="title titleOne">
|
||||
<div>开户行列表</div>
|
||||
<el-button type="primary" size="mini" class="btntopblueline" @click="handleAdd">新增</el-button>
|
||||
</div>
|
||||
<el-table :key="tableKey" :data="formobj.pmsSupplierBankList" :index="index" border style="width: 100%">
|
||||
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
|
||||
<el-table-column fixed width="150" label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="handleEdit(scope.row, scope.$index)">编辑</el-button>
|
||||
<el-button type="danger" size="mini" @click="handleDelete(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dueBankValue" label="账户类型" align="center" width="100" />
|
||||
<el-table-column prop="bankName" label="开户银行" align="center" width="120"/>
|
||||
<el-table-column prop="bankAccount" label="银行账号" align="center" width="100" />
|
||||
<el-table-column prop="accountName" label="账号名称" align="center" width="160" />
|
||||
<el-table-column prop="bankingOutlets" label="银行网点" align="center" width="100" />
|
||||
<el-table-column prop="bankAddress" label="开户行地址" align="center" min-width="200"/>
|
||||
<el-table-column prop="paymentLines" label="联行号" align="center" width="100"/>
|
||||
<el-table-column prop="swiftCode" label="swifcode(银行代码)" align="center" width="170" />
|
||||
<el-table-column prop="currency" label="币种" align="center" width="100"/>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<openingbank v-show="viewState == 2 || viewState == 3" ref="divOpen" @backData="backData" @doback="resetState" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/supplier/supplier.js'
|
||||
import openingbank from './relation/openingbank'
|
||||
import { getProvince, getCity, getCounty, typeValues } from '@/api/system/dictType/dictCommon'
|
||||
|
||||
export default {
|
||||
name: 'SupplierAdd',
|
||||
components: {
|
||||
openingbank
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewTitle: '',
|
||||
viewState: 1,
|
||||
submitdisabled: false,
|
||||
tableKey: 0,
|
||||
index: 0,
|
||||
supplierType_list: [],
|
||||
province_list: [],
|
||||
city_list: [],
|
||||
county_list: [],
|
||||
billingType_list: [],
|
||||
formobj: {
|
||||
sid: '',
|
||||
supplierCode: '',
|
||||
supplierName: '',
|
||||
supplierPY: '',
|
||||
supplierTypeSid: '',
|
||||
supplierTypeName: '',
|
||||
provinceSid: '',
|
||||
province: '',
|
||||
citySid: '',
|
||||
city: '',
|
||||
countySid: '',
|
||||
county: '',
|
||||
address: '',
|
||||
contactMobile: '',
|
||||
contactTelePhone: '',
|
||||
contactName: '',
|
||||
fax: '',
|
||||
zipCode: '',
|
||||
email: '',
|
||||
website: '',
|
||||
billingCompanyName: '',
|
||||
registNum: '',
|
||||
legalName: '',
|
||||
purchaser: '',
|
||||
sortNo: '',
|
||||
billingTypeKey: '',
|
||||
billingTypeValue: '',
|
||||
useOrgSid: '',
|
||||
createOrgName: '',
|
||||
createOrgSid: '',
|
||||
taxRate: '',
|
||||
remarks: '',
|
||||
pmsSupplierBankList: []
|
||||
},
|
||||
rules: {
|
||||
supplierName: [{ required: true, message: '供应商名称不能为空', trigger: 'blur' }],
|
||||
supplierPY: [{ required: true, message: '供应商简称不能为空', trigger: 'blur' }],
|
||||
supplierCode: [{ required: true, message: '供应商编码不能为空', trigger: 'blur' }],
|
||||
supplierTypeSid: [{ required: true, message: '供应商类型不能为空', trigger: 'change' }],
|
||||
contactTelePhone: [{ required: true, message: '供应商电话不能为空', trigger: 'blur' }],
|
||||
billingCompanyName: [{ required: true, message: '开票公司名称不能为空', trigger: 'blur' }],
|
||||
billingTypeValue: [{ required: true, message: '开票类型不能为空', trigger: 'change' }],
|
||||
taxRate: [{ required: true, message: '税率不能为空', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
typeValues({ type: 'accountType' }).then((res) => {
|
||||
if (res.success) {
|
||||
this.billingType_list = res.data
|
||||
}
|
||||
})
|
||||
getProvince().then((res) => {
|
||||
if (res.success) {
|
||||
this.province_list = res.data
|
||||
}
|
||||
})
|
||||
req.selSupplierType({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
|
||||
if (res.success) {
|
||||
this.supplierType_list = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getNumber(val, limit) {
|
||||
val = val.replace(/[^0-9.]/g, '') // 保留数字
|
||||
val = val.replace(/^00/, '0.') // 开头不能有两个0
|
||||
val = val.replace(/^\./g, '0.') // 开头为小数点转换为0.
|
||||
val = val.replace(/\.{2,}/g, '.') // 两个以上的小数点转换成一个
|
||||
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); // 只保留一个小数点
|
||||
/^0\d+/.test(val) ? val = val.slice(1) : '' // 两位以上数字开头不能为0
|
||||
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
|
||||
const reg = new RegExp(str)
|
||||
if (limit === 0) {
|
||||
// 不需要小数点
|
||||
val = val.replace(reg, '$1')
|
||||
} else {
|
||||
// 通过正则保留小数点后指定的位数
|
||||
val = val.replace(reg, '$1.$2')
|
||||
}
|
||||
return val
|
||||
},
|
||||
supplierTypeChange(value) {
|
||||
const choose = this.supplierType_list.filter((item) => item.sid === value)
|
||||
if (choose !== null && choose.length > 0) {
|
||||
this.formobj.supplierTypeName = choose[0].supplierTypeName
|
||||
}
|
||||
},
|
||||
provinceChange(value) {
|
||||
const choose = this.province_list.filter((item) => item.name === value)
|
||||
if (choose !== null && choose.length > 0) {
|
||||
this.formobj.provinceSid = choose[0].sid
|
||||
this.getCity(this.formobj.provinceSid)
|
||||
} else {
|
||||
this.formobj.provinceSid = ''
|
||||
this.formobj.citySid = ''
|
||||
this.formobj.city = ''
|
||||
this.city_list = []
|
||||
this.formobj.county = ''
|
||||
this.formobj.countySid = ''
|
||||
this.county_list = []
|
||||
}
|
||||
},
|
||||
getCity(val) {
|
||||
getCity({ sid: val }).then((res) => {
|
||||
if (res.success) {
|
||||
this.city_list = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
cityChange(value) {
|
||||
const choose = this.city_list.filter((item) => item.name === value)
|
||||
if (choose !== null && choose.length > 0) {
|
||||
this.formobj.citySid = choose[0].sid
|
||||
this.getCounty(this.formobj.citySid)
|
||||
}
|
||||
},
|
||||
getCounty(val) {
|
||||
getCounty({ sid: val }).then((res) => {
|
||||
if (res.success) {
|
||||
this.county_list = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
countyChange(value) {
|
||||
const choose = this.county_list.filter((item) => item.name === value)
|
||||
if (choose !== null && choose.length > 0) {
|
||||
this.formobj.countySid = choose[0].sid
|
||||
}
|
||||
},
|
||||
showAdd() {
|
||||
this.viewTitle = '【新增】供应商'
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form_obj'].clearValidate()
|
||||
})
|
||||
this.init()
|
||||
},
|
||||
showEdit(row) {
|
||||
this.viewTitle = '【编辑】供应商'
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form_obj'].clearValidate()
|
||||
})
|
||||
this.init()
|
||||
req.fetchDetailsBySid(row.sid).then((res) => {
|
||||
if (res.success) {
|
||||
this.formobj = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
billingTypeChange(value) {
|
||||
const choose = this.billingType_list.filter((item) => item.dictValue === value)
|
||||
if (choose !== null && choose.length > 0) {
|
||||
this.formobj.billingTypeKey = choose[0].dictKey
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divOpen'].showAdd()
|
||||
},
|
||||
handleEdit(row, index) {
|
||||
this.viewState = 3
|
||||
this.$refs['divOpen'].showEdit(row, index)
|
||||
},
|
||||
handleDelete(index) {
|
||||
this.formobj.pmsSupplierBankList.splice(index, 1)
|
||||
},
|
||||
backData(value, index) {
|
||||
this.viewState = 1
|
||||
value = JSON.parse(JSON.stringify(value))
|
||||
if (index !== '' && index !== null) {
|
||||
this.formobj.pmsSupplierBankList[index] = {
|
||||
sid: value.sid,
|
||||
supplierSid: value.supplierSid,
|
||||
bankName: value.bankName,
|
||||
bankAccount: value.bankAccount,
|
||||
accountName: value.accountName,
|
||||
dueBankKey: value.dueBankKey,
|
||||
dueBankValue: value.dueBankValue,
|
||||
bankingOutlets: value.bankingOutlets,
|
||||
bankAddress: value.bankAddress,
|
||||
paymentLines: value.paymentLines,
|
||||
swiftCode: value.swiftCode,
|
||||
currency: value.currency
|
||||
}
|
||||
} else {
|
||||
this.formobj.pmsSupplierBankList.push({
|
||||
sid: '',
|
||||
supplierSid: value.supplierSid,
|
||||
bankName: value.bankName,
|
||||
bankAccount: value.bankAccount,
|
||||
accountName: value.accountName,
|
||||
dueBankKey: value.dueBankKey,
|
||||
dueBankValue: value.dueBankValue,
|
||||
bankingOutlets: value.bankingOutlets,
|
||||
bankAddress: value.bankAddress,
|
||||
paymentLines: value.paymentLines,
|
||||
swiftCode: value.swiftCode,
|
||||
currency: value.currency
|
||||
})
|
||||
}
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
saveOrUpdate() {
|
||||
this.$refs['form_obj'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitdisabled = true
|
||||
req.saveOrUpdate(this.formobj).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message({ showClose: true, type: 'success', message: '保存成功' })
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
this.submitdisabled = false
|
||||
}
|
||||
}).catch(() => {
|
||||
this.submitdisabled = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
supplierCode: '',
|
||||
supplierName: '',
|
||||
supplierPY: '',
|
||||
supplierTypeSid: '',
|
||||
supplierTypeName: '',
|
||||
provinceSid: '',
|
||||
province: '',
|
||||
citySid: '',
|
||||
city: '',
|
||||
countySid: '',
|
||||
county: '',
|
||||
address: '',
|
||||
contactMobile: '',
|
||||
contactTelePhone: '',
|
||||
contactName: '',
|
||||
fax: '',
|
||||
zipCode: '',
|
||||
email: '',
|
||||
website: '',
|
||||
billingCompanyName: '',
|
||||
registNum: '',
|
||||
legalName: '',
|
||||
purchaser: '',
|
||||
sortNo: '',
|
||||
billingTypeKey: '',
|
||||
billingTypeValue: '',
|
||||
useOrgSid: '',
|
||||
createOrgName: '',
|
||||
createOrgSid: '',
|
||||
taxRate: '',
|
||||
remarks: '',
|
||||
pmsSupplierBankList: []
|
||||
}
|
||||
this.submitdisabled = false
|
||||
this.$emit('doback')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.span-sty {
|
||||
width: 130px !important;
|
||||
}
|
||||
.addinputInfo {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
|
||||
margin-left: 120px !important;
|
||||
width: calc(100% - 115px);
|
||||
}
|
||||
/deep/ .el-form-item__error {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
.titleOne {
|
||||
padding: 7px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
/*表格列设置fixed后固定列出现下边框的设置*/
|
||||
/deep/ .el-table__fixed {
|
||||
height: 100% !important;
|
||||
}
|
||||
/*表格列设置fixed后固定列出现下边框的设置*/
|
||||
/deep/ .el-table__fixed-right {
|
||||
height: 100% !important;
|
||||
}
|
||||
</style>
|
||||
236
src/views/baseInfo/supplier/supplier/supplierInfo.vue
Normal file
236
src/views/baseInfo/supplier/supplier/supplierInfo.vue
Normal file
@@ -0,0 +1,236 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<div class="tab-header webtop">
|
||||
<div>{{ viewTitle }}</div>
|
||||
<div>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="listconadd">
|
||||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
|
||||
<div class="title">基本信息</div>
|
||||
<el-row style="border-top: 1px solid #e0e3eb">
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">供应商名称</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.supplierName }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">供应商简称</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.supplierPY }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">供应商编码</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.supplierCode }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">供应商类型</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.supplierTypeName }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">供应商电话</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.contactTelePhone }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">供应商传真</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.fax }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="span-sty">详细地址</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.province }}{{ formobj.city }}{{ formobj.county }}{{ formobj.address }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">联系人</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.contactName }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">联系电话</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.contactMobile }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">邮编</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.zipCode }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">电子邮件</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.email }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">网址</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.website }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">开票公司名称</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.billingCompanyName }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">税号</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.registNum }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">法人</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.legalName }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">采购员</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.purchaser }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">开票类型</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.billingTypeValue }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">税率</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.taxRate }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="span-sty">备注</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="title">开户行列表</div>
|
||||
<el-table :key="tableKey" :data="formobj.pmsSupplierBankList" :index="index" border style="width: 100%">
|
||||
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
|
||||
<el-table-column prop="dueBankValue" label="账户类型" align="center" width="100" />
|
||||
<el-table-column prop="bankName" label="开户银行" align="center" width="120"/>
|
||||
<el-table-column prop="bankAccount" label="银行账号" align="center" width="100" />
|
||||
<el-table-column prop="accountName" label="账号名称" align="center" width="160" />
|
||||
<el-table-column prop="bankingOutlets" label="银行网点" align="center" width="100" />
|
||||
<el-table-column prop="bankAddress" label="开户行地址" align="center" min-width="200"/>
|
||||
<el-table-column prop="paymentLines" label="联行号" align="center" width="100"/>
|
||||
<el-table-column prop="swiftCode" label="swifcode(银行代码)" align="center" width="170" />
|
||||
<el-table-column prop="currency" label="币种" align="center" width="100"/>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/supplier/supplier.js'
|
||||
|
||||
export default {
|
||||
name: 'SupplierInfo',
|
||||
data() {
|
||||
return {
|
||||
viewTitle: '',
|
||||
viewState: 1,
|
||||
tableKey: 0,
|
||||
index: 0,
|
||||
formobj: {
|
||||
sid: '',
|
||||
supplierCode: '',
|
||||
supplierName: '',
|
||||
supplierPY: '',
|
||||
supplierTypeSid: '',
|
||||
supplierTypeName: '',
|
||||
provinceSid: '',
|
||||
province: '',
|
||||
citySid: '',
|
||||
city: '',
|
||||
countySid: '',
|
||||
county: '',
|
||||
address: '',
|
||||
contactMobile: '',
|
||||
contactTelePhone: '',
|
||||
contactName: '',
|
||||
fax: '',
|
||||
zipCode: '',
|
||||
email: '',
|
||||
website: '',
|
||||
billingCompanyName: '',
|
||||
registNum: '',
|
||||
legalName: '',
|
||||
purchaser: '',
|
||||
sortNo: '',
|
||||
billingTypeKey: '',
|
||||
billingTypeValue: '',
|
||||
useOrgSid: '',
|
||||
createOrgName: '',
|
||||
createOrgSid: '',
|
||||
taxRate: '',
|
||||
remarks: '',
|
||||
pmsSupplierBankList: []
|
||||
},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showInfo(row) {
|
||||
this.viewTitle = '供应商详情'
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form_obj'].clearValidate()
|
||||
})
|
||||
req.fetchDetailsBySid(row.sid).then((res) => {
|
||||
if (res.success) {
|
||||
this.formobj = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
handleReturn() {
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
supplierCode: '',
|
||||
supplierName: '',
|
||||
supplierPY: '',
|
||||
supplierTypeSid: '',
|
||||
supplierTypeName: '',
|
||||
provinceSid: '',
|
||||
province: '',
|
||||
citySid: '',
|
||||
city: '',
|
||||
countySid: '',
|
||||
county: '',
|
||||
address: '',
|
||||
contactMobile: '',
|
||||
contactTelePhone: '',
|
||||
contactName: '',
|
||||
fax: '',
|
||||
zipCode: '',
|
||||
email: '',
|
||||
website: '',
|
||||
billingCompanyName: '',
|
||||
registNum: '',
|
||||
legalName: '',
|
||||
purchaser: '',
|
||||
sortNo: '',
|
||||
billingTypeKey: '',
|
||||
billingTypeValue: '',
|
||||
useOrgSid: '',
|
||||
createOrgName: '',
|
||||
createOrgSid: '',
|
||||
taxRate: '',
|
||||
remarks: '',
|
||||
pmsSupplierBankList: []
|
||||
}
|
||||
this.$emit('doback')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.span-sty {
|
||||
width: 130px !important;
|
||||
}
|
||||
.addinputInfo {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
</style>
|
||||
296
src/views/baseInfo/supplier/suppliertype/suppliertype.vue
Normal file
296
src/views/baseInfo/supplier/suppliertype/suppliertype.vue
Normal file
@@ -0,0 +1,296 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--列表页面-->
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar view-title="供应商类型管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
|
||||
<!--Start查询列表部分-->
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
|
||||
<el-form-item label="供应商类型">
|
||||
<el-input v-model="listQuery.params.supplierTypeName" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商编码">
|
||||
<el-input v-model="listQuery.params.supplierTypeCode" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End查询列表部分-->
|
||||
<div class="listtop">
|
||||
<div class="tit">供应商类型列表</div>
|
||||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
|
||||
</div>
|
||||
<!--Start 主页面主要部分 -->
|
||||
<div class="">
|
||||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="50" />
|
||||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" width="180px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="supplierTypeName" label="供应商类型" align="center" />
|
||||
<el-table-column prop="supplierTypeCode" label="供应商编码" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<!--End 主页面主要部分-->
|
||||
<div class="pages">
|
||||
<div class="tit"/>
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
|
||||
</div>
|
||||
<!--End查询列表部分-->
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogVisible" width="70%">
|
||||
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
|
||||
<el-row style="border-top: 1px solid #E0E3EB">
|
||||
<el-col :span="12">
|
||||
<div class="span-sty"><span class="icon">*</span>供应商类型</div>
|
||||
<el-form-item><el-input class="addinputInfo" style="width: 60%" v-model.trim="formobj.supplierTypeName" clearable placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="span-sty"><span class="icon">*</span>供应商编码</div>
|
||||
<el-form-item><el-input class="addinputInfo" style="width: 60%" v-model.trim="formobj.supplierTypeCode" clearable placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleConfirm">确定</el-button>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import req from '@/api/baseinfo/suppliertype/suppliertype.js'
|
||||
export default {
|
||||
name: 'SupplierType',
|
||||
components: {
|
||||
Pagination,
|
||||
pageye,
|
||||
ButtonBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
dialogVisible: false,
|
||||
btnList: [
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'danger',
|
||||
size: 'small',
|
||||
icon: 'del',
|
||||
btnKey: 'doDel',
|
||||
btnLabel: '删除'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看
|
||||
tableKey: 0,
|
||||
list: [],
|
||||
sids: [], // 用于导出的时候保存已选择的SIDs
|
||||
FormLoading: false,
|
||||
listLoading: false,
|
||||
// 翻页
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
supplierTypeName: '',
|
||||
supplierTypeCode: '',
|
||||
orgPath: ''
|
||||
}
|
||||
},
|
||||
formobj: {
|
||||
sid: '',
|
||||
supplierTypeName: '',
|
||||
supplierTypeCode: '',
|
||||
orgPath: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 初始化变量
|
||||
this.getList()
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
console.log('XXXXXXXXXXXXXXX ' + btnKey)
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doDel':
|
||||
this.doDel()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
// 信息条数 获取点击时当前的sid
|
||||
handleSelectionChange(row) {
|
||||
const aa = []
|
||||
row.forEach(element => {
|
||||
aa.push(element.sid)
|
||||
})
|
||||
this.sids = aa
|
||||
},
|
||||
// 表中序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
// 查询列表信息
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
||||
req.listPage(this.listQuery).then((response) => {
|
||||
this.listLoading = false
|
||||
if (response.success) {
|
||||
this.list = response.data.records
|
||||
this.listQuery.total = response.data.total
|
||||
} else {
|
||||
this.list = []
|
||||
this.listQuery.total = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询按钮
|
||||
handleFilter() {
|
||||
this.listQuery.current = 1
|
||||
this.getList()
|
||||
},
|
||||
// 点击重置
|
||||
handleReset() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
supplierTypeName: '',
|
||||
supplierTypeCode: '',
|
||||
orgPath: ''
|
||||
}
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
toAdd() {
|
||||
this.dialogVisible = true
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
supplierTypeName: '',
|
||||
supplierTypeCode: '',
|
||||
orgPath: ''
|
||||
}
|
||||
},
|
||||
toEdit(row) {
|
||||
this.dialogVisible = true
|
||||
this.formobj = {
|
||||
sid: row.sid,
|
||||
supplierTypeName: row.supplierTypeName,
|
||||
supplierTypeCode: row.supplierTypeCode,
|
||||
orgPath: ''
|
||||
}
|
||||
},
|
||||
handleConfirm() {
|
||||
if (this.formobj.supplierTypeName === '' || this.formobj.supplierTypeCode === '') {
|
||||
this.$message({ showClose: true, type: 'error', message: '供应商类型或编码不能为空' })
|
||||
return
|
||||
}
|
||||
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
||||
req.saveOrUpdate(this.formobj).then((res) => {
|
||||
if (res.success) {
|
||||
this.dialogVisible = false
|
||||
this.$message({ showClose: true, type: 'success', message: '保存成功' })
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
doDel() {
|
||||
if (this.sids.length === 0) {
|
||||
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
|
||||
return
|
||||
}
|
||||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.delBySids(this.sids).then(resp => {
|
||||
if (resp.success) {
|
||||
this.$message({ type: 'success', message: resp.msg, showClose: true })
|
||||
}
|
||||
this.getList()
|
||||
loading.close()
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.span-sty {
|
||||
width: 100px !important;
|
||||
}
|
||||
.addinputInfo {
|
||||
margin-left: 90px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,245 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="单位列表" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="单位名称">
|
||||
<el-input v-model="queryParams.params.name" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">单位列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
|
||||
<!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
|
||||
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可用" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1"
|
||||
inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unitName" label="单位名称" align="center" />
|
||||
<el-table-column prop="remarks" label="单位备注" align="center" />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End 查询和其列表部分 -->
|
||||
<!-- 新增修改部分组件 -->
|
||||
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/unit/unit.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './unitAdd.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
req.updateIsEnable(sid, state).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态已更新',
|
||||
showClose: true
|
||||
})
|
||||
} else { // 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -1,210 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>单位信息</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-card class="box-card">
|
||||
<div class="item">
|
||||
<span class="item_text">单位名称:</span>
|
||||
<el-input v-model="formobj.unitName" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">单位备注:</span>
|
||||
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<!-- <div class="item">
|
||||
<span class="item_text">品牌故事:</span>
|
||||
<el-input v-model="formobj.brandStory" placeholder="" class="item_input" clearable />
|
||||
</div> -->
|
||||
|
||||
<!-- <div class="item" style="margin-bottom: 100px;margin-top: 100px;">
|
||||
|
||||
<div style="flex: 1;display: flex;flex-direction: row;align-items: center;">
|
||||
<span class="item_text2" >品牌Logo:</span>
|
||||
<upload ref="uploadImg2" v-model="imgList" style="margin-top: 20px;" class="item_input2" :limit="1"
|
||||
bucket="map" :class="{ hide: hideUploadBtn }" :upload-data="{ type: '0001' }" @change="backData" />
|
||||
</div>
|
||||
<div style="flex: 1;display: flex;flex-direction: row;align-items: center;">
|
||||
<span class="item_text2">专区大图:</span>
|
||||
<upload ref="uploadImg2" v-model="imgList2" style="margin-top: 20px;" class="item_input2" :limit="1"
|
||||
bucket="map" :class="{ hide: hideUploadBtn2 }" :upload-data="{ type: '0001' }" @change="backData2" />
|
||||
</div>
|
||||
|
||||
|
||||
</div> -->
|
||||
<!-- <div class="item" style="margin-bottom: 100px;margin-top: 100px;">
|
||||
<span class="item_text">品牌Logo:</span>
|
||||
<upload ref="uploadImg" v-model="imgList" style="" class="item_input" :limit="1"
|
||||
bucket="map" :class="{ hide: hideUploadBtn }" :upload-data="{ type: '0001' }" @change="backData" />
|
||||
</div> -->
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/unit/unit.js'
|
||||
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao.vue'
|
||||
export default {
|
||||
components: {
|
||||
upload,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
sid: '',
|
||||
unitName: '',
|
||||
remarks: '',
|
||||
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.initData()
|
||||
},
|
||||
methods: {
|
||||
|
||||
saveOrUpdate() {
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
||||
req.saveUnits(this.formobj)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: resp.msg
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
unitName: '',
|
||||
remarks: '',
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
showAdd() {
|
||||
},
|
||||
showEdit(row) {
|
||||
req.initUnits(row.sid)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = row
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// 隐藏上传组件
|
||||
|
||||
::v-deep .hide {
|
||||
.el-upload--picture-card {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.box-card {
|
||||
margin-left: 60px;
|
||||
margin-right: 60px;
|
||||
min-width: 70%;
|
||||
margin-top: 20px;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
||||
.item_text {
|
||||
flex: 0.8;
|
||||
font-size: 18px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.item_input {
|
||||
flex: 4;
|
||||
font-size: 16px;
|
||||
margin-left: 10px;
|
||||
margin-right: 80px;
|
||||
}
|
||||
|
||||
.item_text2 {
|
||||
flex: 1;
|
||||
font-size: 18px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
.item_input2 {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
margin-left: 10px;
|
||||
margin-right: 80px;
|
||||
}
|
||||
|
||||
.item_left_input {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.item_left_text {
|
||||
height: 30px;
|
||||
margin-left: 20px;
|
||||
line-height: 30px;
|
||||
color: #018AD2;
|
||||
padding: 0px 15px;
|
||||
border: 1.5px solid #018AD2;
|
||||
border-radius: 5px;
|
||||
|
||||
}
|
||||
|
||||
.item_right {
|
||||
flex: 1;
|
||||
justify-items: center;
|
||||
|
||||
.item_right_list_text {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.item_right_list_delect {
|
||||
color: #5E94FF;
|
||||
margin-left: 20px;
|
||||
font-size: 16px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,227 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--列表页面-->
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar view-title="结转库存查询" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
|
||||
<!--Start查询列表部分-->
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
|
||||
<el-form-item label="商品名称">
|
||||
<el-input v-model="listQuery.params.goodsSpuName" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件号">
|
||||
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库">
|
||||
<el-input v-model="listQuery.params.warehouseName" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算日期">
|
||||
<el-date-picker v-model="listQuery.params.startDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
|
||||
<span style="padding: 0 8px">至</span>
|
||||
<el-date-picker v-model="listQuery.params.endDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End查询列表部分-->
|
||||
<div class="listtop">
|
||||
<div class="tit">结转库存查询列表</div>
|
||||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
|
||||
</div>
|
||||
<!--Start 主页面主要部分 -->
|
||||
<div class="">
|
||||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;">
|
||||
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
|
||||
<el-table-column fixed prop="goodsSpuName" label="商品" align="center" width="150"/>
|
||||
<el-table-column prop="goodsSkuCode" label="零件号" align="center"/>
|
||||
<el-table-column prop="goodsSkuOwnSpec" label="规格型号" align="center" width="100" />
|
||||
<el-table-column prop="warehouseName" label="仓库" align="center"/>
|
||||
<el-table-column prop="warehouseArea" label="库区" align="center"/>
|
||||
<el-table-column prop="warehouseRackName" label="货架" align="center"/>
|
||||
<el-table-column prop="preBalance" label="上期结存" align="center" width="100" />
|
||||
<el-table-column prop="currentBalance" label="本期结存" align="center"/>
|
||||
<el-table-column prop="settleType" label="库存结算类型" align="center"/>
|
||||
<el-table-column prop="createTime" label="结算日期" align="center" width="120"/>
|
||||
</el-table>
|
||||
</div>
|
||||
<!--End 主页面主要部分-->
|
||||
<div class="pages">
|
||||
<div class="tit"/>
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
|
||||
</div>
|
||||
<!--End查询列表部分-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import req from '@/api/carryover/carryover'
|
||||
|
||||
export default {
|
||||
name: 'CarryoverStock',
|
||||
components: {
|
||||
Pagination,
|
||||
pageye,
|
||||
ButtonBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
btnList: [
|
||||
{
|
||||
type: 'success',
|
||||
size: 'small',
|
||||
icon: 'export',
|
||||
btnKey: 'doExport',
|
||||
btnLabel: '导出'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看
|
||||
tableKey: 0,
|
||||
list: [],
|
||||
sids: [], // 用于导出的时候保存已选择的SIDs
|
||||
FormLoading: false,
|
||||
listLoading: false,
|
||||
// 翻页
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
warehouseName: '',
|
||||
goodsSpuName: '',
|
||||
goodsSkuCode: '',
|
||||
useOrgSid: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 初始化变量
|
||||
this.getList()
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
console.log('XXXXXXXXXXXXXXX ' + btnKey)
|
||||
switch (btnKey) {
|
||||
case 'doExport':
|
||||
this.doExport()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
// 表中序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
// 查询列表信息
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
req.listPage(this.listQuery).then(response => {
|
||||
this.listLoading = false
|
||||
if (response.success) {
|
||||
this.list = response.data.records
|
||||
this.listQuery.total = response.data.total
|
||||
} else {
|
||||
this.list = []
|
||||
this.listQuery.total = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询按钮
|
||||
handleFilter() {
|
||||
this.listQuery.current = 1
|
||||
this.getList()
|
||||
},
|
||||
// 点击重置
|
||||
handleReset() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
warehouseName: '',
|
||||
goodsSpuName: '',
|
||||
goodsSkuCode: '',
|
||||
useOrgSid: ''
|
||||
}
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
doExport() {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.exportExcel(this.listQuery.params).then((resp) => {
|
||||
loading.close()
|
||||
const blob = new Blob([resp], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const fileName = '结转库存查询表' + '.xls'
|
||||
const elink = document.createElement('a')
|
||||
elink.download = fileName
|
||||
elink.style.display = 'nonde'
|
||||
elink.href = URL.createObjectURL(blob)
|
||||
document.body.appendChild(elink)
|
||||
elink.click()
|
||||
URL.revokeObjectURL(elink.href)
|
||||
document.body.removeChild(elink)
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -1,432 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="预期到货通知单管理" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="单据编号">
|
||||
<el-input v-model="queryParams.params.billNo" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期">
|
||||
<el-date-picker v-model="queryParams.params.createTimeStart" type="date"
|
||||
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>至
|
||||
<el-date-picker v-model="queryParams.params.createTimeEnd" type="date"
|
||||
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部编号">
|
||||
<el-input v-model="queryParams.params.sourceBillNo" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型">
|
||||
<el-select v-model="queryParams.params.busTypeKey" placeholder="请选择">
|
||||
<el-option v-for="(item,i) in busTypeList" :key="i" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="queryParams.params.supplierName" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="预期到货日期">
|
||||
<el-date-picker v-model="queryParams.params.deliveryDateStart"type="date"
|
||||
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker v-model="queryParams.params.deliveryDateEnd" type="date"
|
||||
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-select v-model="queryParams.params.billState" placeholder="请选择">
|
||||
<el-option v-for="(item,i) in billStateList" :key="i" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态">
|
||||
<el-select v-model="queryParams.params.reviewStatus" placeholder="请选择">
|
||||
<el-option v-for="(item,i) in reviewStatusList" :key="i" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">预期到货通知单列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"
|
||||
@selection-change="selectionLineChangeHandle">
|
||||
<el-table-column fixed width="50" type="selection" align="center" />
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column fixed label="操作" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="billNo" label="单据编号" align="center" width="150"/>
|
||||
<el-table-column prop="createTime" label="单据日期" align="center" width="150"/>
|
||||
<el-table-column prop="createByName" label="制单人" align="center" width="150"/>
|
||||
<el-table-column prop="sourceBillNo" label="外部单号" align="center" width="150"/>
|
||||
<el-table-column prop="busTypeValue" label="业务类型" align="center" width="150"/>
|
||||
<el-table-column prop="supplierName" label="供应商" align="center" width="150"/>
|
||||
<el-table-column prop="contact" label="联系人" align="center" width="150"/>
|
||||
<el-table-column prop="mobile" label="联系人手机" align="center" width="150"/>
|
||||
<el-table-column prop="deliveryDate" label="预计到货日期" align="center" width="150"/>
|
||||
<el-table-column prop="billState" label="单据状态" align="center" width="150" />
|
||||
<el-table-column prop="reviewStatus" label="审核状态" align="center" width="150"/>
|
||||
<el-table-column prop="refuseReason" label="拒绝原因" align="center" width="150"/>
|
||||
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End 查询和其列表部分 -->
|
||||
<!-- 新增修改部分组件 -->
|
||||
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
|
||||
<divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" />
|
||||
|
||||
<el-dialog title="审核单据" :visible.sync="dialogVisible" :before-close="handleClose">
|
||||
<el-form ref="dataForm" class="formadd" style="margin-top: -40px;" :model="formobj">
|
||||
<el-row class="first_row" >
|
||||
<el-col :span="8" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">审核结果</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-radio-group v-model="formobj.reviewStatus" size="small" @change="changeTheme">
|
||||
<el-radio :label="1" >合格</el-radio>
|
||||
<el-radio :label="2">不合格</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">审核意见</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-input v-model="formobj.remarks" placeholder="请填写审核意见" class="addinputw"
|
||||
style="width:100%" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
|
||||
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;">
|
||||
<el-button type="primary" style="margin-top: 20px;" @click="saveExamine">确 定</el-button>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/deliveryNotice/deliveryNotice.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './receiptAdd.vue'
|
||||
import divInfo from './receiptInfo.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd,
|
||||
divInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formobj: {
|
||||
sid: "",
|
||||
reviewStatus: "",
|
||||
remarks: ''
|
||||
},
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAudit',
|
||||
btnLabel: '审核'
|
||||
}, {
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '收货'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: [],
|
||||
selectionList: [],
|
||||
busTypeList:[
|
||||
{
|
||||
name :"业务类型1",
|
||||
sid:"1"
|
||||
},
|
||||
{
|
||||
name :"业务类型2",
|
||||
sid:"2"
|
||||
}
|
||||
],
|
||||
billStateList:[
|
||||
{
|
||||
name :"新建",
|
||||
sid:"0"
|
||||
},
|
||||
{
|
||||
name :"完成",
|
||||
sid:"1"
|
||||
}
|
||||
],
|
||||
reviewStatusList:[
|
||||
{
|
||||
name :"通过",
|
||||
sid:"1"
|
||||
},
|
||||
{
|
||||
name :"不通过",
|
||||
sid:"2"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
saveExamine(){
|
||||
|
||||
},
|
||||
changeTheme(){
|
||||
|
||||
},
|
||||
toAudit(){
|
||||
if (this.selectionList.length != 1) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: "请选择一条数据。",
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
selectTime1() {
|
||||
|
||||
},
|
||||
selectTime2() {
|
||||
|
||||
},
|
||||
selectionLineChangeHandle(val) {
|
||||
console.log("val", val);
|
||||
|
||||
this.selectionList = val
|
||||
|
||||
},
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAudit':
|
||||
this.toAudit()
|
||||
break
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
|
||||
if (this.selectionList.length != 1) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: "请选择一条数据。",
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if(this.selectionList[0].billState=='完成'){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: "此记录已完成,不可操作。",
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showEdit(this.selectionList[0])
|
||||
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 4
|
||||
this.$refs['divinfo'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
req.updateIsEnable(sid, state).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态已更新',
|
||||
showClose: true
|
||||
})
|
||||
} else { // 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -1,772 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>【新增】收货单</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submintdate">确认</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-form ref="form_obj" :model="formobj" label-position="top" label-width="190px" class="formadd">
|
||||
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
|
||||
<div>基础信息</div>
|
||||
</div>
|
||||
<el-row class="first_row">
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据编号</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.billNo}}</span>
|
||||
<!-- <el-input v-model="formobj.name" placeholder="" class="addinputw" style="width:100%" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">制单人姓名</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.createByName}}</span>
|
||||
<!-- <el-input v-model="formobj.preferentialPrice" placeholder="" class="addinputw" style="width:100%"
|
||||
clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">外部单号</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.sourceBillNo}}</span>
|
||||
<!-- <el-form-item class="trightb_item">
|
||||
<el-select v-model="GiftBagGood.goodsSkuSid" filterable clearable placeholder="请选择" style="width:100%"
|
||||
@change="orderTypeSelect">
|
||||
<el-option v-for="item in orderTypeList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据日期</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.createTime}}</span>
|
||||
<!-- <el-select v-model="GiftBagGood.goodsSkuSid" filterable clearable placeholder="请选择" style="width:100%"
|
||||
@change="businessTypeSelect">
|
||||
<el-option v-for="item in businessTypeList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">业务类型</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.busTypeValue}}</span>
|
||||
<!-- <el-input v-model="formobj.preferentialPrice" placeholder="" class="addinputw" style="width:100%"
|
||||
clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">供应商</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.supplierName}}</span>
|
||||
<!-- <el-date-picker v-model="formobj.dateEnd" type="date" style="width:100%" value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">到货日期</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<!-- <span slot="label">{{formobj.goodsOwner}}</span> -->
|
||||
<el-date-picker v-model="formobj.deliveryDate" type="date" style="width:100%" value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据状态</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.billState}}</span>
|
||||
<!-- <el-input v-model="formobj.remarks" placeholder="" class="addinputw"
|
||||
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="4" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">备注</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
|
||||
<el-form-item class="trightb_item">
|
||||
<!-- <span slot="label">{{formobj.supplierName}}</span> -->
|
||||
<el-input v-model="formobj.remarks" placeholder="" class="addinputw"
|
||||
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="4" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<div class="title"
|
||||
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;">
|
||||
<div>商品列表</div>
|
||||
<div class="span" @click="batchAddAll()">批次收货</div>
|
||||
</div>
|
||||
<el-table v-loading="listLoading" :data="formobj.list" border style="width: 100%;"
|
||||
:row-style="{height: '40px'}">
|
||||
<el-table-column fixed width="50" type="selection" align="center" />
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column fixed label="操作" wid align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="doGoods(scope.row)">删除</el-button>
|
||||
<el-button type="primary" size="mini" @click="doAddBatch(scope.row)">批次+</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
|
||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" />
|
||||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" />
|
||||
<el-table-column label="单位" prop="unit" align="center" width="120" />
|
||||
<el-table-column label="仓库" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.warehouseName" placeholder="请选择" clearable
|
||||
@change="selectWarehouseName(scope.row,$event)">
|
||||
<el-option v-for="(item,i) in warehouseList" :key="i" :label="item.warehouseName" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库位" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.warehouseRackName" :disabled="scope.row.warehouseName==''" clearable
|
||||
@focus="getWarehouseAreaList(scope.row.warehouseSid)" placeholder="请选择"
|
||||
@change="selectWarehouseAreaCode">
|
||||
<el-option v-for="(item,i) in warehouseRackList" :key="i" :label="item.areaCode" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预约数量" prop="orderCount" align="center" width="120" />
|
||||
<el-table-column label="实收数量" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE(scope.row,$event)"
|
||||
v-model="scope.row.actualInCount" clearable placeholder=""
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="拒收数量" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input ref="focusAssumptionInput" v-model="scope.row.rejectCount" clearable placeholder=""
|
||||
@input="commodityComputeYHAndXSJE2(scope.row,$event)"
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="拒收原因" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-input ref="focusAssumptionInput" v-model="scope.row.rejectReason" clearable placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否质检" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-radio-group v-model="scope.row.isQuality" size="small" @change="changeTheme">
|
||||
<el-radio :label="0">需要</el-radio>
|
||||
<el-radio :label="1">不需要</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检状态" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-radio-group v-model="scope.row.qualityState" size="small" @change="changeTheme2">
|
||||
<el-radio :label="0">合格</el-radio>
|
||||
<el-radio :label="1">不合格</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="载具说明" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-input ref="focusAssumptionInput" v-model="scope.row.packageRemark" clearable placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库价" prop="cost" align="center" width="100" />
|
||||
<el-table-column label="税额" prop="taxAmount" align="center" width="100" />
|
||||
<el-table-column label="含税单价" prop="taxPrice" align="center" width="100" />
|
||||
<el-table-column label="入库金额" prop="amount" align="center" width="100" />
|
||||
</el-table>
|
||||
|
||||
|
||||
<div class="title"
|
||||
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;">
|
||||
<div>商品-批次</div>
|
||||
</div>
|
||||
<el-table v-loading="listLoading" :data="formobj.pcList" border style="width: 100%;"
|
||||
:row-style="{height: '40px'}">
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column fixed label="操作" wid align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="doGoodsBatch(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品列表序号" prop="xh" align="center" width="120" />
|
||||
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
|
||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" />
|
||||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" />
|
||||
<el-table-column label="单位" prop="unit" align="center" width="120" />
|
||||
<el-table-column label="仓库" prop="unit" align="center" width="150" />
|
||||
<el-table-column label="库位" prop="unit" align="center" width="150" />
|
||||
<el-table-column label="批次号" prop="batchNumber" align="center" width="300" />
|
||||
<el-table-column label="生产日期" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.manufactureDate" type="date" style="width:100%"
|
||||
value-format="yyyy-MM-dd" placeholder="选择日期" @change="manufactureDateChange(scope.row,$event)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效期" prop="expirationDate" align="center" width="180" />
|
||||
<el-table-column label="数量" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input ref="focusAssumptionInput" v-model="scope.row.batchCount" clearable placeholder=""
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/deliveryNotice/deliveryNotice.js'
|
||||
import req2 from '@/api/warehouse/allocation/allocation.js'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
listLoading: false,
|
||||
activeNames: ['1'],
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
sourceBillNo: "",
|
||||
busTypeKey: "",
|
||||
busTypeValue: "",
|
||||
createByName: "",
|
||||
billState: 0,
|
||||
reviewStatus: "",
|
||||
refuseReason: "",
|
||||
contact: "",
|
||||
mobile: "",
|
||||
supplierSid: "",
|
||||
supplierName: "",
|
||||
goodsOwnerSid: "",
|
||||
goodsOwner: "",
|
||||
deliveryDate: "",
|
||||
list: [],
|
||||
pcList: []
|
||||
},
|
||||
hideUploadBtn: false,
|
||||
warehouseList: [],
|
||||
warehouseRackList: []
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
|
||||
|
||||
getWarehouseList() {
|
||||
req2.getWarehouses().then((res) => {
|
||||
if (res.success) {
|
||||
this.warehouseList = res.data
|
||||
|
||||
console.log("aaaaaa", this.warehouseList);
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getWarehouseAreaList(sid) {
|
||||
var query = {
|
||||
ckSid: sid
|
||||
}
|
||||
req2.getWarehouseareas(query).then((res) => {
|
||||
if (res.success) {
|
||||
this.warehouseRackList = res.data
|
||||
|
||||
console.log("aaaaaa", this.warehouseRackList);
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
selectWarehouseName(row, val) {
|
||||
console.log("selectWarehouseName", row);
|
||||
console.log("selectWarehouseName", val);
|
||||
const choose = this.warehouseList.filter((item) => item.sid == val)
|
||||
console.log('>>>>>>>>>selectWarehouseName', choose)
|
||||
row.warehouseName = choose[0].warehouseName
|
||||
row.warehouseSid = choose[0].sid
|
||||
|
||||
},
|
||||
selectWarehouseAreaCode(val) {
|
||||
console.log("selectWarehouseAreaCode", val);
|
||||
|
||||
const choose = this.warehouseRackList.filter((item) => item.sid == val)
|
||||
console.log('>>>>>>>>>selectWarehouseAreaCode', choose)
|
||||
row.warehouseRackName = choose[0].areaCode
|
||||
row.warehouseRackSid = choose[0].sid
|
||||
|
||||
},
|
||||
|
||||
batchAddAll() {
|
||||
|
||||
for (var i = 0; i < this.formobj.list.length; i++) {
|
||||
var item = this.formobj.list[i]
|
||||
|
||||
var info = {
|
||||
xh: i + 1,
|
||||
goodsSkuSid: item.goodsSkuSid,
|
||||
goodsSkuTitle: item.goodsSkuTitle,
|
||||
goodsSkuCode: item.goodsSkuCode,
|
||||
goodsSkuOwnSpec: item.goodsSkuOwnSpec,
|
||||
unit: item.unit,
|
||||
warehouseSid: item.warehouseSid,
|
||||
warehouseName: item.warehouseName,
|
||||
warehouseRackSid: item.warehouseRackSid,
|
||||
warehouseRackName: item.warehouseRackName,
|
||||
shelfLife: item.shelfLife,
|
||||
orderCount: item.orderCount,
|
||||
batchNumber: '',
|
||||
manufactureDate: '',
|
||||
batchCount: 0,
|
||||
}
|
||||
|
||||
this.formobj.pcList.push(info)
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
doGoods(row) {
|
||||
console.log("doGoodsDel》》》》", row)
|
||||
|
||||
this.$confirm("是否确定删除此商品?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const index = this.formobj.list.findIndex((item) => item === row)
|
||||
console.log("index》》》》", index)
|
||||
this.formobj.list.splice(index, 1)
|
||||
|
||||
for (var i = this.formobj.pcList.length - 1; i >= 0; i--) {
|
||||
if (this.formobj.pcList[i].number === (index + 1)) {
|
||||
this.formobj.pcList.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
doGoodsBatch(row) {
|
||||
console.log("doGoodsDel》》》》", row)
|
||||
|
||||
this.$confirm("是否确定删除此商品?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const index = this.formobj.pcList.findIndex((item) => item === row)
|
||||
console.log("index》》》》", index)
|
||||
this.formobj.pcList.splice(index, 1)
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
manufactureDateChange(row, val) {
|
||||
|
||||
console.log("manufactureDateChange》》》》", val)
|
||||
|
||||
row.manufactureDate = val
|
||||
row.expirationDate = this.addDate(val, row.shelfLife)
|
||||
|
||||
let reg = new RegExp('-', 'g') //g代表全部
|
||||
|
||||
row.batchNumber = this.formobj.deliveryDate.replace(reg, '') + " - " + row.expirationDate.replace(reg, '')
|
||||
|
||||
|
||||
|
||||
this.$forceUpdate(); // 强制更新
|
||||
console.log("manufactureDateChange》》》》", row)
|
||||
|
||||
},
|
||||
|
||||
addDate(date, days) {
|
||||
var dates = new Date(date)
|
||||
dates.setDate(dates.getDate() + days)
|
||||
var year = dates.getFullYear()
|
||||
var month = dates.getMonth() + 1
|
||||
var day = dates.getDate()
|
||||
if (month < 9) {
|
||||
month = "0" + month
|
||||
}
|
||||
if (day < 9) {
|
||||
day = "0" + day
|
||||
}
|
||||
var time = year + '-' + month + '-' + day
|
||||
return time
|
||||
},
|
||||
|
||||
doAddBatch(row) {
|
||||
const index = (this.formobj.list.findIndex((item) => item === row)) + 1
|
||||
console.log("doAddBatch》》》》", index)
|
||||
console.log("doAddBatch》》》》", row)
|
||||
|
||||
var info = {
|
||||
xh: index,
|
||||
goodsSkuSid: row.goodsSkuSid,
|
||||
goodsSkuTitle: row.goodsSkuTitle,
|
||||
goodsSkuCode: row.goodsSkuCode,
|
||||
goodsSkuOwnSpec: row.goodsSkuOwnSpec,
|
||||
unit: row.unit,
|
||||
warehouseSid: row.warehouseSid,
|
||||
warehouseName: row.warehouseName,
|
||||
warehouseRackSid: row.warehouseRackSid,
|
||||
warehouseRackName: row.warehouseRackName,
|
||||
shelfLife: row.shelfLife,
|
||||
orderCount: row.orderCount,
|
||||
batchNumber: '',
|
||||
manufactureDate: '',
|
||||
batchCount: 0,
|
||||
}
|
||||
|
||||
console.log("aaaaaaaaaaa", info);
|
||||
|
||||
this.formobj.pcList.push(info)
|
||||
|
||||
},
|
||||
commodityComputeYHAndXSJE(row, val) {
|
||||
console.log("aaa", row);
|
||||
console.log("aaa", val);
|
||||
|
||||
if (Number(row.actualInCount) > Number(row.orderCount)) {
|
||||
row.actualInCount = row.orderCount
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
commodityComputeYHAndXSJE2(row, val) {
|
||||
console.log("aaa", row);
|
||||
console.log("aaa", val);
|
||||
|
||||
if ((Number(row.rejectCount) + Number(row.actualInCount)) > Number(row.orderCount)) {
|
||||
row.rejectCount = Number(row.orderCount) - Number(row.actualInCount)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
changeTheme() {
|
||||
|
||||
},
|
||||
|
||||
changeTheme2() {
|
||||
|
||||
},
|
||||
|
||||
|
||||
indexMethod(index) {
|
||||
return index + 1
|
||||
},
|
||||
saveOrUpdate() {
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
||||
|
||||
if (this.formobj.deliveryDate == '') {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '到货日期不能为空'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
for (var i = 0; i < this.formobj.pcList.length; i++) {
|
||||
var item = this.formobj.pcList[i]
|
||||
|
||||
if (item.manufactureDate == '') {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '生产日期不能为空'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (Number(item.batchCount) == 0) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '商品批次数量不能为0'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (var i = 0; i < this.formobj.list.length; i++) {
|
||||
var index = i
|
||||
var num = 0
|
||||
const choose = this.formobj.pcList.filter((item) => Number(item.xh) == (index + 1))
|
||||
for (var j = 0; j < choose.length; j++) {
|
||||
|
||||
num += Number(choose[j].batchCount)
|
||||
|
||||
}
|
||||
|
||||
console.log('>>>>>>>>>saveOrUpdate', num)
|
||||
|
||||
if (num > Number(this.formobj.list[i].actualInCount)) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '商品批次数量不能大于商品实收数量'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.$refs['form_obj'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitdisabled = true
|
||||
req.save(this.formobj).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: '保存成功'
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
this.submitdisabled = false
|
||||
}
|
||||
}).catch(() => {
|
||||
this.submitdisabled = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
submintdate() {
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
||||
|
||||
|
||||
for (var i = 0; i < this.formobj.pcList.length; i++) {
|
||||
var item = this.formobj.pcList[i]
|
||||
|
||||
if (item.manufactureDate == '') {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '生产日期不能为空'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (Number(item.batchCount) == 0) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '商品批次数量不能为0'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (var i = 0; i < this.formobj.list.length; i++) {
|
||||
var index = i
|
||||
var num = 0
|
||||
const choose = this.formobj.pcList.filter((item) => Number(item.xh) == (index + 1))
|
||||
for (var j = 0; j < choose.length; j++) {
|
||||
|
||||
num += Number(choose[j].batchCount)
|
||||
|
||||
}
|
||||
|
||||
console.log('>>>>>>>>>saveOrUpdate', num)
|
||||
|
||||
if (num > Number(this.formobj.list[i].actualInCount)) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '商品批次数量不能大于商品实收数量'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.$refs['form_obj'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitdisabled = true
|
||||
req.submit(this.formobj).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: '保存成功'
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
this.submitdisabled = false
|
||||
}
|
||||
}).catch(() => {
|
||||
this.submitdisabled = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.formobj = {
|
||||
sourceBillNo: "",
|
||||
busTypeKey: "",
|
||||
busTypeValue: "",
|
||||
createByName: "",
|
||||
billState: 0,
|
||||
reviewStatus: "",
|
||||
refuseReason: "",
|
||||
contact: "",
|
||||
mobile: "",
|
||||
supplierSid: "",
|
||||
supplierName: "",
|
||||
goodsOwnerSid: "",
|
||||
goodsOwner: "",
|
||||
deliveryDate: "",
|
||||
list: [],
|
||||
pcList: []
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
|
||||
showAdd() {
|
||||
|
||||
},
|
||||
showEdit(row) {
|
||||
this.getWarehouseList()
|
||||
var params = {
|
||||
sid: row.sid
|
||||
}
|
||||
|
||||
req.getInitDetails(params)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = {}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// 隐藏上传组件
|
||||
|
||||
::v-deep .hide {
|
||||
.el-upload--picture-card {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.trightb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.trightb_item {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.span {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-left: 50px;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
border: 1px #fff solid;
|
||||
padding: 0px 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__header {
|
||||
height: 40px;
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
text-align: left;
|
||||
color: #ffffff;
|
||||
background-color: #0294d7;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -1,275 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>预期到货通知单</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-form ref="dataForm" :model="formobj" label-position="top" label-width="190px" class="formadd">
|
||||
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
|
||||
<div>基础信息</div>
|
||||
</div>
|
||||
<el-row class="first_row">
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据编号</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.billNo}}</span>
|
||||
<!-- <el-input v-model="formobj.name" placeholder="" class="addinputw" style="width:100%" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">制单人姓名</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.createByName}}</span>
|
||||
<!-- <el-input v-model="formobj.preferentialPrice" placeholder="" class="addinputw" style="width:100%"
|
||||
clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">外部单号</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.sourceBillNo}}</span>
|
||||
<!-- <el-form-item class="trightb_item">
|
||||
<el-select v-model="GiftBagGood.goodSpuSid" filterable clearable placeholder="请选择" style="width:100%"
|
||||
@change="orderTypeSelect">
|
||||
<el-option v-for="item in orderTypeList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据日期</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.createTime}}</span>
|
||||
<!-- <el-select v-model="GiftBagGood.goodSpuSid" filterable clearable placeholder="请选择" style="width:100%"
|
||||
@change="businessTypeSelect">
|
||||
<el-option v-for="item in businessTypeList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">业务类型</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.busTypeValue}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">供应商</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.supplierName}}</span>
|
||||
<!-- <el-input v-model="formobj.remarks" placeholder="" class="addinputw"
|
||||
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="4" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">预期到货日期</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.deliveryDate}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据状态</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.billState}}</span>
|
||||
<!-- <el-input v-model="formobj.remarks" placeholder="" class="addinputw"
|
||||
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="4" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">审核状态</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.reviewStatus}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">拒绝原因</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.refuseReason}}</span>
|
||||
<!-- <el-input v-model="formobj.remarks" placeholder="" class="addinputw"
|
||||
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="4" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class="title"
|
||||
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;">
|
||||
<div>商品列表</div>
|
||||
</div>
|
||||
<el-table v-loading="listLoading" :data="formobj.list" border style="width: 100%;"
|
||||
:row-style="{height: '40px'}">
|
||||
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
|
||||
<el-table-column fixed label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
|
||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" />
|
||||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" />
|
||||
<el-table-column label="单位" prop="unit" align="center" width="120" />
|
||||
<el-table-column label="仓库" prop="warehouseName" align="center" width="120" />
|
||||
<el-table-column label="库位" prop="warehouseRack" align="center" width="120" />
|
||||
<el-table-column label="预约数量" prop="orderCount" align="center" width="120" />
|
||||
<el-table-column label="待收货数量" prop="waitInCount" align="center" width="120" />
|
||||
<el-table-column label="已收货数量" prop="actualInCount" align="center" width="100" />
|
||||
<el-table-column label="入库价" prop="cost" align="center" width="100" />
|
||||
<el-table-column label="税额" prop="taxAmount" align="center" width="100" />
|
||||
<el-table-column label="含税单价" prop="taxPrice" align="center" width="100" />
|
||||
<el-table-column label="采购金额" prop="amount" align="center" width="100" />
|
||||
</el-table>
|
||||
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/deliveryNotice/deliveryNotice.js'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
listLoading: false,
|
||||
submitdisabled: false,
|
||||
formobj: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
indexMethod(index) {
|
||||
return index + 1
|
||||
},
|
||||
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.$emit('doback')
|
||||
},
|
||||
|
||||
showAdd() {
|
||||
|
||||
},
|
||||
showEdit(row) {
|
||||
|
||||
var params = {
|
||||
sid: row.sid
|
||||
}
|
||||
req.init(params)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = {}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// 隐藏上传组件
|
||||
|
||||
::v-deep .hide {
|
||||
.el-upload--picture-card {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.trightb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.trightb_item {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.span {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-left: 50px;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
border: 1px #fff solid;
|
||||
padding: 0px 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__header {
|
||||
height: 40px;
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
text-align: left;
|
||||
color: #ffffff;
|
||||
background-color: #0294d7;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -1,448 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="库存列表" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="商品名称">
|
||||
<el-input v-model="queryParams.params.goodsSpuName" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">库存列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="handleSelectionChange">
|
||||
<el-table-column fixed width="50" type="selection" align="center" />
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column fixed label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toEdit(scope.row)">修改</el-button>
|
||||
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
|
||||
<el-button type="primary" size="mini" @click="toSendOrReceive(scope.row)">收发存</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
|
||||
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
|
||||
<el-table-column prop="count" label="库存" align="center" />
|
||||
<el-table-column prop="warehouseName" label="仓库" align="center" />
|
||||
<el-table-column prop="warehouseArea" label="货位" align="center" />
|
||||
<el-table-column prop="freePrice" label="三包价" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit"/>
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End 查询和其列表部分 -->
|
||||
<!-- 新增修改部分组件 -->
|
||||
<inventoryAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="loadList" />
|
||||
<!-- 详情 -->
|
||||
<inventoryInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" />
|
||||
<!-- 收发存 -->
|
||||
<el-dialog :visible.sync="sendOrReceiveVisible" width="70%">
|
||||
<div>
|
||||
<el-form ref="multipleTable" :inline="true" :model="sendOrReceiveQuery" class="vinNoForm" label-width="100px">
|
||||
<el-form-item label="日期">
|
||||
<el-date-picker v-model="sendOrReceiveQuery.params.createTimeStart" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
|
||||
<span style="padding: 0 8px">至</span>
|
||||
<el-date-picker v-model="sendOrReceiveQuery.params.createTimeEnd" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="small" @click="selectSendOrReceive">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table :key="sendOrReceiveKey" v-loading="sendOrReceiveLoading" :data="sendOrReceiveList" border fit highlight-current-row style="width: 100%;">
|
||||
<el-table-column :index="SendOrReceiveIndexMethod" align="center" label="序号" type="index" width="80"/>
|
||||
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
|
||||
<el-table-column prop="goodsSkuTitle" label="商品标题" align="center" />
|
||||
<el-table-column prop="goodsSkuOwnSpec" label="规格型号" align="center" />
|
||||
<el-table-column prop="warehouseName" label="仓库" align="center" />
|
||||
<el-table-column prop="warehouseRackName" label="货架" align="center" />
|
||||
<el-table-column prop="cost" label="单位成本" align="center" />
|
||||
</el-table>
|
||||
<div class="pages">
|
||||
<div class="tit"/>
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="sendOrReceiveList.length > 0" :limit.sync="sendOrReceiveQuery.size" :page.sync="sendOrReceiveQuery.current" :total="sendOrReceiveQuery.total" class="pagination" @pagination="getsendOrReceiveList"/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 结转 -->
|
||||
<el-dialog :visible.sync="carryOverVisible" width="70%">
|
||||
<el-form :model="formobj" class="formaddcopy02">
|
||||
<el-row style="border-top: 1px solid #e0e3eb">
|
||||
<el-col :span="12">
|
||||
<div class="span-sty">创建人</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="span-sty">创建时间</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div class="span-sty">库存结算状态</div>
|
||||
<el-form-item>
|
||||
<el-radio-group class="addinputInfo" style="font-size: 1px" v-model="formobj.settleState">
|
||||
<el-radio label="1">进行中</el-radio>
|
||||
<el-radio label="2">已完成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="span-sty">库存结算类型</div>
|
||||
<el-form-item>
|
||||
<el-radio-group class="addinputInfo" style="font-size: 1px" v-model="formobj.settleState">
|
||||
<el-radio label="1">月结</el-radio>
|
||||
<el-radio label="2">年结</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="small" @click="handleConfirm()">确定</el-button>
|
||||
<el-button size="small" @click="carryOverVisible = false">关闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/inventory/inventory.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import inventoryAdd from './inventoryAdd.vue'
|
||||
import inventoryInfo from './inventoryInfo.vue'
|
||||
|
||||
export default {
|
||||
name: 'Inventory',
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
inventoryAdd,
|
||||
inventoryInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: '',
|
||||
btnKey: 'carryOver',
|
||||
btnLabel: '结转'
|
||||
},
|
||||
{
|
||||
type: 'danger',
|
||||
size: 'small',
|
||||
icon: 'del',
|
||||
btnKey: 'doDel',
|
||||
btnLabel: '删除'
|
||||
},
|
||||
{
|
||||
type: 'success',
|
||||
size: 'small',
|
||||
icon: 'export',
|
||||
btnKey: 'doExport',
|
||||
btnLabel: '导出'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
goodsSpuName: ''
|
||||
}
|
||||
},
|
||||
sids: [],
|
||||
sendOrReceiveVisible: false, // 查看收发存
|
||||
sendOrReceiveKey: 2,
|
||||
sendOrReceiveQuery: {
|
||||
current: 1,
|
||||
size: 5,
|
||||
total: 0,
|
||||
params: {
|
||||
createTimeStart: '',
|
||||
createTimeEnd: '',
|
||||
busTypeKey: '',
|
||||
sid: ''
|
||||
}
|
||||
},
|
||||
sendOrReceiveList: [],
|
||||
sendOrReceiveLoading: false,
|
||||
carryOverVisible: false,
|
||||
formobj: {
|
||||
createTime: '',
|
||||
createBySid: '',
|
||||
createByName: '',
|
||||
settleState: '',
|
||||
settleType: '',
|
||||
settleStartTime: '',
|
||||
settleEndTime: '',
|
||||
useOrgSid: '',
|
||||
createOrgSid: '',
|
||||
sids: []
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'carryOver':
|
||||
this.carryOver()
|
||||
break
|
||||
case 'doDel':
|
||||
this.doDel()
|
||||
break
|
||||
case 'doExport':
|
||||
this.doExport()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
// 信息条数 获取点击时当前的sid
|
||||
handleSelectionChange(row) {
|
||||
const aa = []
|
||||
row.forEach(element => {
|
||||
aa.push(element.sid)
|
||||
})
|
||||
this.sids = aa
|
||||
},
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
goodsSpuName: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toEdit(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divAdd'].showEdit(row)
|
||||
},
|
||||
toInfo(row) {
|
||||
this.viewState = 4
|
||||
this.$refs['divInfo'].showInfo(row)
|
||||
},
|
||||
// 结转
|
||||
carryOver() {
|
||||
if (this.sids.length === 0) {
|
||||
this.$message({ showClose: true, type: 'error', message: '请至少勾选一条记录进行操作' })
|
||||
return
|
||||
}
|
||||
this.carryOverVisible = true
|
||||
this.formobj = {
|
||||
createTime: '',
|
||||
createBySid: '',
|
||||
createByName: '',
|
||||
settleState: '',
|
||||
settleType: '',
|
||||
settleStartTime: '',
|
||||
settleEndTime: '',
|
||||
useOrgSid: '',
|
||||
createOrgSid: '',
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
handleConfirm() {
|
||||
this.formobj.sids = this.sids
|
||||
req.saveSettlebill(this.formobj).then((res) => {
|
||||
if (res.success) {
|
||||
this.carryOverVisible = false
|
||||
this.$message({ showClose: true, type: 'success', message: '结转成功' })
|
||||
this.loadList()
|
||||
}
|
||||
})
|
||||
},
|
||||
doDel() {
|
||||
if (this.sids.length > 0) {
|
||||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteBySids(this.sids).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({ type: 'success', message: resp.msg, showClose: true })
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
} else {
|
||||
this.$message({ showClose: true, message: '请至少选择一条记录进行删除操作' })
|
||||
}
|
||||
},
|
||||
doExport() {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.exportExcel(this.queryParams.params).then((resp) => {
|
||||
loading.close()
|
||||
const blob = new Blob([resp], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const fileName = '库存查询' + '.xls'
|
||||
const elink = document.createElement('a')
|
||||
elink.download = fileName
|
||||
elink.style.display = 'nonde'
|
||||
elink.href = URL.createObjectURL(blob)
|
||||
document.body.appendChild(elink)
|
||||
elink.click()
|
||||
URL.revokeObjectURL(elink.href)
|
||||
document.body.removeChild(elink)
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
},
|
||||
toSendOrReceive(row) {
|
||||
this.sendOrReceiveVisible = true
|
||||
this.sendOrReceiveQuery.params.sid = row.sid
|
||||
this.getsendOrReceiveList()
|
||||
},
|
||||
// 收发存
|
||||
SendOrReceiveIndexMethod(index) {
|
||||
var pagestart = (this.sendOrReceiveQuery.current - 1) * this.sendOrReceiveQuery.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
// 收发存--加载列表
|
||||
getsendOrReceiveList() {
|
||||
this.sendOrReceiveLoading = true
|
||||
req.getBillList(this.sendOrReceiveQuery).then(response => {
|
||||
this.sendOrReceiveLoading = false
|
||||
if (response.success) {
|
||||
this.sendOrReceiveList = response.data.records
|
||||
this.sendOrReceiveQuery.total = response.data.total
|
||||
} else {
|
||||
this.sendOrReceiveList = []
|
||||
this.sendOrReceiveQuery.total = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
// 收发存
|
||||
selectSendOrReceive() {
|
||||
this.sendOrReceiveQuery.current = 1
|
||||
this.getsendOrReceiveList()
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.span-sty {
|
||||
width: 130px !important;
|
||||
}
|
||||
.addinputInfo {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
|
||||
margin-left: 120px !important;
|
||||
width: calc(100% - 115px);
|
||||
}
|
||||
</style>
|
||||
@@ -1,194 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<div class="tab-header webtop">
|
||||
<div>{{ viewTitle }}</div>
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="listconadd">
|
||||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
|
||||
<el-collapse v-model="activeNames">
|
||||
<el-collapse-item title="商品信息" name="1">
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="库存信息" name="2">
|
||||
<el-row style="border-top: 1px solid #e0e3eb">
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">仓库</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.warehouseName }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">供应商</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.billObjName }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">数量</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.count }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">销售价格1</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price1" clearablea placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">销售价格2</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price2" clearablea placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">销售价格3</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price3" clearablea placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">销售价格4</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price4" clearablea placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">销售价格5</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price5" clearablea placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">销售底价</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.minimumPrice" clearablea placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">货位</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.warehouseArea" clearablea placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">折扣标志</div>
|
||||
<el-form-item>
|
||||
<el-switch class="addinputInfo" v-model="formobj.isShowDiscount" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">三包价格</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.freePrice" clearablea placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">首保价格</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.firstMaintainPrice" clearablea placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">排序</div>
|
||||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.sortNo" clearablea placeholder="" /></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/inventory/inventory'
|
||||
|
||||
export default {
|
||||
name: 'InventoryAdd',
|
||||
data() {
|
||||
return {
|
||||
viewTitle: '',
|
||||
viewState: 1,
|
||||
submitdisabled: false,
|
||||
activeNames: '2',
|
||||
formobj: {
|
||||
sid: '',
|
||||
warehouseName: '',
|
||||
billObjName: '',
|
||||
count: '',
|
||||
price1: '',
|
||||
price2: '',
|
||||
price3: '',
|
||||
price4: '',
|
||||
price5: '',
|
||||
minimumPrice: '',
|
||||
warehouseArea: '',
|
||||
isShowDiscount: '',
|
||||
freePrice: '',
|
||||
firstMaintainPrice: '',
|
||||
sortNo: ''
|
||||
},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showEdit(row) {
|
||||
this.viewTitle = '【编辑】'
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form_obj'].clearValidate()
|
||||
})
|
||||
req.fetchBySid({ sid: row.sid }).then((res) => {
|
||||
if (res.success) {
|
||||
this.formobj = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
saveOrUpdate() {
|
||||
this.$refs['form_obj'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitdisabled = true
|
||||
req.saveOrUpdate(this.formobj).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message({ showClose: true, type: 'success', message: '保存成功' })
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
this.submitdisabled = false
|
||||
}
|
||||
}).catch(() => {
|
||||
this.submitdisabled = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
warehouseName: '',
|
||||
billObjName: '',
|
||||
count: '',
|
||||
price1: '',
|
||||
price2: '',
|
||||
price3: '',
|
||||
price4: '',
|
||||
price5: '',
|
||||
minimumPrice: '',
|
||||
warehouseArea: '',
|
||||
isShowDiscount: '',
|
||||
freePrice: '',
|
||||
firstMaintainPrice: '',
|
||||
sortNo: ''
|
||||
}
|
||||
this.submitdisabled = false
|
||||
this.$refs['form_obj'].resetFields()
|
||||
this.$emit('doback')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.span-sty {
|
||||
width: 130px !important;
|
||||
}
|
||||
.addinputInfo {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
|
||||
margin-left: 120px !important;
|
||||
width: calc(100% - 115px);
|
||||
}
|
||||
</style>
|
||||
@@ -1,173 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<div class="tab-header webtop">
|
||||
<div>{{ viewTitle }}</div>
|
||||
<div>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="listconadd">
|
||||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
|
||||
<el-collapse v-model="activeNames">
|
||||
<el-collapse-item title="商品信息" name="1">
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="库存信息" name="2">
|
||||
<el-row style="border-top: 1px solid #e0e3eb">
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">仓库</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.warehouseName }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">供应商</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.billObjName }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">数量</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.count }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">销售价格1</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.price1 }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">销售价格2</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.price2 }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">销售价格3</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.price3 }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">销售价格4</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.price4 }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">销售价格5</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.price5 }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">销售底价</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.minimumPrice }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">货位</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.warehouseArea }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">折扣标志</div>
|
||||
<el-form-item>
|
||||
<el-switch class="addinputInfo" v-model="formobj.isShowDiscount" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">三包价格</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.freePrice }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">首保价格</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.firstMaintainPrice }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">排序</div>
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.sortNo }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/inventory/inventory'
|
||||
|
||||
export default {
|
||||
name: 'InventoryInfo',
|
||||
data() {
|
||||
return {
|
||||
viewTitle: '',
|
||||
viewState: 1,
|
||||
activeNames: '2',
|
||||
formobj: {
|
||||
sid: '',
|
||||
warehouseName: '',
|
||||
billObjName: '',
|
||||
count: '',
|
||||
price1: '',
|
||||
price2: '',
|
||||
price3: '',
|
||||
price4: '',
|
||||
price5: '',
|
||||
minimumPrice: '',
|
||||
warehouseArea: '',
|
||||
isShowDiscount: '',
|
||||
freePrice: '',
|
||||
firstMaintainPrice: '',
|
||||
sortNo: ''
|
||||
},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showInfo(row) {
|
||||
this.viewTitle = '详情'
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form_obj'].clearValidate()
|
||||
})
|
||||
req.fetchBySid({ sid: row.sid }).then((res) => {
|
||||
if (res.success) {
|
||||
this.formobj = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
handleReturn() {
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
warehouseName: '',
|
||||
billObjName: '',
|
||||
count: '',
|
||||
price1: '',
|
||||
price2: '',
|
||||
price3: '',
|
||||
price4: '',
|
||||
price5: '',
|
||||
minimumPrice: '',
|
||||
warehouseArea: '',
|
||||
isShowDiscount: '',
|
||||
freePrice: '',
|
||||
firstMaintainPrice: '',
|
||||
sortNo: ''
|
||||
}
|
||||
this.$refs['form_obj'].resetFields()
|
||||
this.$emit('doback')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.span-sty {
|
||||
width: 130px !important;
|
||||
}
|
||||
.addinputInfo {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
|
||||
margin-left: 120px !important;
|
||||
width: calc(100% - 115px);
|
||||
}
|
||||
</style>
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<img src="../../assets/loginImg/login_left.png" style="width:50%;height:100%; " />
|
||||
|
||||
<div class="main-right">
|
||||
<div class="main-right" v-show="register==0">
|
||||
|
||||
<span class="main-right-title">欢迎登录商享通WMS</span>
|
||||
|
||||
@@ -45,19 +45,130 @@
|
||||
|
||||
<div class="main-right-bom">
|
||||
|
||||
<el-checkbox class="main-right-bom-left">7天内免登录</el-checkbox>
|
||||
<el-checkbox class="main-right-bom-left" v-model="checkbox">7天内免登录</el-checkbox>
|
||||
|
||||
<div class="main-right-bom-right">
|
||||
|
||||
<span>忘记密码</span>
|
||||
<span @click="forgetClick">忘记密码</span>
|
||||
<div style="margin-left: 8px;margin-right: 8px;width: 1px; height: 18px;background: #999;"></div>
|
||||
<span>去注册</span>
|
||||
<span @click="registerClick">去注册</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="main-right" v-show="register==1">
|
||||
|
||||
<div v-show="registerStep==1" class="registerStep1">
|
||||
<span class="main-right-title2">欢迎注册商享通WMS</span>
|
||||
|
||||
|
||||
<span style="width: 100%; margin-top: 15px;">手机号码</span>
|
||||
|
||||
<el-input class="input" style="flex: 1; margin-right: 10px;margin-top: 5px;" maxlength="11"
|
||||
placeholder="请输入手机号码" v-model="registerInfo.mobile" />
|
||||
|
||||
<span style="width: 100%;margin-top: 15px;">密码</span>
|
||||
|
||||
<el-input class="input" style="flex: 1; margin-right: 10px;margin-top: 5px;" maxlength="6" placeholder="请输入密码"
|
||||
v-model="registerInfo.password" show-password />
|
||||
|
||||
<span style="width: 100%;margin-top: 15px;">验证码</span>
|
||||
<div
|
||||
style="display: flex;flex-direction: row;align-items: center;width: 100%; margin-top: 5px;margin-left: -10px;">
|
||||
<el-input class="input" style="flex: 1; margin-right: 10px;" maxlength="6" placeholder="请输入验证码"
|
||||
v-model="registerInfo.code" />
|
||||
<span :class="sendCodeType2 ? 'sendCode1' : 'sendCode2'" @click="sendCode2">{{sendCodeText2}}</span>
|
||||
</div>
|
||||
|
||||
<div style="display: flex;flex-direction: row;align-items: center;width: 100%; margin-top: 5px;"
|
||||
@click="goLogin">
|
||||
<span>已有账号?</span>
|
||||
<span style="color: #5084D2;">登录</span>
|
||||
</div>
|
||||
|
||||
|
||||
<el-button type="primary" size="small"
|
||||
style="width: 100%;margin-top: 30px; font-size: 25px;line-height: 40px;"
|
||||
@click="registerStep1()">注册</el-button>
|
||||
|
||||
<div style="display: flex;flex-direction: row;align-items: center;width: 100%; margin-top: 10px;">
|
||||
<el-checkbox style="margin-right: 5px;" v-model="check"></el-checkbox>
|
||||
<span style="font-size: 12px;">我已阅读并同意</span>
|
||||
<span style="font-size: 12px;">《宇信通服务协议》</span>
|
||||
<span style="font-size: 12px;">与</span>
|
||||
<span style="font-size: 12px;">《隐私协议》</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-show="registerStep==2" class="registerStep2">
|
||||
|
||||
<span class="main-right-title">请选择公司进入WMS</span>
|
||||
|
||||
<div style="height: 300px;width: 100%; margin-top: 15px;overflow: auto;
|
||||
display: flex;flex-direction: column;">
|
||||
|
||||
<div v-for="(item,index) in companyList" :key="index" @click="itemClick(item)"
|
||||
style="display: flex;flex-direction: column;width: 100%;">
|
||||
<div style="display: flex;flex-direction: row;align-items: center;
|
||||
background: #EDF1F7; border-radius: 8px;width: 100%;margin-bottom: 20px;
|
||||
height: 50px;">
|
||||
<img src="../../assets/images/company_icon.png" style="width: 25px; height: 25px;
|
||||
margin-left: 10px;margin-right: 10px;" />
|
||||
<span style="flex: 1;margin-right: 10px;">{{item.orgName}}</span>
|
||||
<img v-show="item.type=='1'" src="../../assets/images/overdue.png" style=" height: 100%;" />
|
||||
<img v-show="item.type=='2'" src="../../assets/images/experience.png" style=" height: 100%;" />
|
||||
<img v-show="item.type=='3'" src="../../assets/images/formal.png" style=" height: 100%;" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<el-button type="primary" size="small"
|
||||
style="width: 100%;margin-top: 30px; font-size: 25px;line-height: 40px;"
|
||||
@click="registerStep2()">新建企业信息</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-show="registerStep==3" class="registerStep3">
|
||||
|
||||
<span class="main-right-title2">欢迎注册商享通WMS</span>
|
||||
|
||||
<span style="width: 100%; font-size: 16px;color: #000; margin-top: 40px;">请填写您的企业信息</span>
|
||||
|
||||
<div style="display: flex;flex-direction: row;align-items: center; margin-top: 15px;width: 100%; ">
|
||||
<span>企业名称:</span>
|
||||
<el-input class="input" style="flex: 1; " placeholder="请输入公司名称" v-model="registerInfo.companyName" />
|
||||
</div>
|
||||
|
||||
<div style="display: flex;flex-direction: row;align-items: center;margin-top: 15px;width: 100%; ">
|
||||
<span>联系人员:</span>
|
||||
<el-input class="input" style="flex: 1;" placeholder="请输入联系人" v-model="registerInfo.contacts" />
|
||||
</div>
|
||||
|
||||
<div style="display: flex;flex-direction: row;align-items: center;margin-top: 15px;width: 100%; ">
|
||||
<span>所在区域:</span>
|
||||
<!-- <el-input class="input" style="flex: 1; margin-right: 10px;" placeholder="请输入公司名称"
|
||||
v-model="registerInfo.company" /> -->
|
||||
|
||||
<el-cascader v-model="selectedOptions" :options="options" filterable clearable class="input"
|
||||
style="flex: 1;" @change="handleChange" />
|
||||
|
||||
</div>
|
||||
<el-button type="primary" size="small"
|
||||
style="width: 100%;margin-top: 30px; font-size: 25px;line-height: 40px;"
|
||||
@click="registerStep3()">创建并进入</el-button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -67,36 +178,52 @@
|
||||
<script>
|
||||
import {
|
||||
doLogin,
|
||||
registerSendMessageCode,
|
||||
bindOrganization,
|
||||
selOrganization,
|
||||
getUserById,
|
||||
imgCode
|
||||
registUser
|
||||
} from '@/api/user.js'
|
||||
import user from '@/api/User/login.js'
|
||||
// 导入省市区数据组件
|
||||
import {
|
||||
setToken,
|
||||
getToken,
|
||||
setSession
|
||||
} from '@/utils/auth'
|
||||
import imgCodeRole from '@/components/imgCodeRole/index.vue'
|
||||
import qs from 'qs'
|
||||
regionData,
|
||||
codeToText,
|
||||
TextToCode
|
||||
} from 'element-china-area-data'
|
||||
import {
|
||||
setCookie,
|
||||
getCookie,
|
||||
removeCookie,
|
||||
} from '@/utils/functions.js.js'
|
||||
export default {
|
||||
components: {
|
||||
imgCodeRole
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
checkbox: false,
|
||||
register: 0,
|
||||
registerStep: 1,
|
||||
tableIndex: 1,
|
||||
|
||||
sendCodeText: "发送验证码",
|
||||
sendCodeType: false,
|
||||
totalTime: 10, //一般是60
|
||||
timer: '', //定时器
|
||||
|
||||
sendCodeText2: "发送验证码",
|
||||
sendCodeType2: false,
|
||||
totalTime2: 10, //一般是60
|
||||
timer2: '', //定时器
|
||||
|
||||
check: false,
|
||||
registerInfo: {
|
||||
mobile: '',
|
||||
userSid: ""
|
||||
},
|
||||
loginForm: {
|
||||
userName: '',
|
||||
password: '',
|
||||
verifyCode: "",
|
||||
type: "1"
|
||||
},
|
||||
imgCode: '',
|
||||
loading: false,
|
||||
loginCode: false,
|
||||
showMsg: false,
|
||||
@@ -105,9 +232,99 @@
|
||||
userPhone: '',
|
||||
userName: '',
|
||||
},
|
||||
// 将省市区数据赋给级联选择器
|
||||
options: regionData,
|
||||
// 存放用户选择后省市区的信息
|
||||
selectedOptions: [],
|
||||
companyList: [
|
||||
// {
|
||||
// sid: "1",
|
||||
// name: "撒打算打算1阿斯顿撒大撒打算打算大萨达",
|
||||
// type: "1"
|
||||
// }, {
|
||||
// sid: "2",
|
||||
// name: "撒打算打算2",
|
||||
// type: "2"
|
||||
// }, {
|
||||
// sid: "3",
|
||||
// name: "撒打算打算3",
|
||||
// type: "3"
|
||||
// }, {
|
||||
// sid: "4",
|
||||
// name: "撒打算打算4",
|
||||
// type: "1"
|
||||
// }, {
|
||||
// sid: "5",
|
||||
// name: "撒打算打算5",
|
||||
// type: "1"
|
||||
// }, {
|
||||
// sid: "6",
|
||||
// name: "撒打算打算6",
|
||||
// type: "1"
|
||||
// }, {
|
||||
// sid: "7",
|
||||
// name: "撒打算打算7",
|
||||
// type: "1"
|
||||
// }, {
|
||||
// sid: "1",
|
||||
// name: "撒打算打算1",
|
||||
// type: "1"
|
||||
// }, {
|
||||
// sid: "1",
|
||||
// name: "撒打算打算1",
|
||||
// type: "1"
|
||||
// }, {
|
||||
// sid: "1",
|
||||
// name: "撒打算打算1",
|
||||
// type: "1"
|
||||
// },
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
if (getCookie("pas") && getCookie("name")) { //判断页面是否有对应Cookie
|
||||
this.loginForm.userName = getCookie("name"); //有则写入
|
||||
this.loginForm.password = getCookie("pas");
|
||||
|
||||
console.log(" created", this.loginForm)
|
||||
|
||||
this.checkbox = true
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
this.loginForm.userName = ""; //无则写空
|
||||
this.loginForm.password = "";
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 省市区级联选择器选择后更新用户前端
|
||||
handleChange(value) {
|
||||
console.log(" handleChange", value)
|
||||
|
||||
var province = ''
|
||||
var city = ''
|
||||
var country = ''
|
||||
for (let i = 0; i < this.selectedOptions.length; i++) {
|
||||
if (i === 0) {
|
||||
var province = codeToText[this.selectedOptions[i]]
|
||||
}
|
||||
if (i === 1) {
|
||||
var city = codeToText[this.selectedOptions[i]]
|
||||
}
|
||||
if (i === 2) {
|
||||
var country = codeToText[this.selectedOptions[i]]
|
||||
}
|
||||
}
|
||||
|
||||
console.log(" handleChange", province + "/" + city + "/" + country)
|
||||
|
||||
this.registerInfo.region = province + "/" + city + "/" + country
|
||||
|
||||
},
|
||||
tableClick(index) {
|
||||
this.tableIndex = index
|
||||
|
||||
@@ -132,8 +349,60 @@
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
// 验证码倒计时
|
||||
sendCode2() {
|
||||
|
||||
if (this.registerInfo.mobile == '') {
|
||||
this.$message({
|
||||
message: '请输入手机号码',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
var reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/
|
||||
|
||||
console.log(" reg", reg.test(this.registerInfo.mobile))
|
||||
|
||||
if (!reg.test(this.registerInfo.mobile)) {
|
||||
this.$message({
|
||||
message: '手机号码格式错误',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (this.sendCodeType2) return
|
||||
// this.getCode() // 获取验证码的接口
|
||||
this.sendCodeType2 = true
|
||||
this.sendCodeText2 = this.totalTime2 + 's'
|
||||
this.timer2 = setInterval(() => {
|
||||
this.totalTime2--
|
||||
this.sendCodeText2 = this.totalTime2 + 's'
|
||||
if (this.totalTime2 < 0) {
|
||||
clearInterval(this.timer2)
|
||||
this.sendCodeText2 = '发送验证码'
|
||||
this.totalTime2 = 10
|
||||
this.sendCodeType2 = false
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
registerSendMessageCode(this.registerInfo.mobile).then((response) => {}).catch(() => {})
|
||||
|
||||
},
|
||||
|
||||
login() {
|
||||
|
||||
if (this.checkbox) { //判断多选框是否选中
|
||||
setCookie("name", this.loginForm.userName, 7); //如选中则添加Cookie,添加内容为用户输入的密码和用户名
|
||||
setCookie("pas", this.loginForm.password, 7);
|
||||
} else {
|
||||
removeCookie("name"); //如没选中,则删除掉对应的Cookie
|
||||
removeCookie("pas");
|
||||
}
|
||||
|
||||
// this.register = 1
|
||||
// this.registerStep = 2
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
@@ -142,17 +411,20 @@
|
||||
})
|
||||
doLogin(this.loginForm).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$router.push({
|
||||
path: '/index'
|
||||
})
|
||||
loading.close()
|
||||
// this.getUserInfo(response.data.loginId)
|
||||
window.sessionStorage.setItem('token', response.data.token)
|
||||
window.sessionStorage.setItem('sid', response.data.sid)
|
||||
window.sessionStorage.setItem('staffSid', response.data.staffSid)
|
||||
window.sessionStorage.setItem('userName', response.data.userName)
|
||||
|
||||
console.log(" token", sessionStorage.getItem('token'))
|
||||
loading.close()
|
||||
this.register = 1
|
||||
|
||||
this.companyList = response.data.sysOrganizationVos
|
||||
this.registerInfo.userSid = response.data.sid
|
||||
|
||||
if (this.companyList.length == 0) {
|
||||
// 1. 新用户 无关联企业
|
||||
this.registerStep = 3
|
||||
} else {
|
||||
// 2. 注册过 选择企业登录
|
||||
this.registerStep = 2
|
||||
}
|
||||
} else {
|
||||
loading.close()
|
||||
}
|
||||
@@ -162,6 +434,148 @@
|
||||
})
|
||||
|
||||
},
|
||||
forgetClick() {
|
||||
|
||||
},
|
||||
registerClick() {
|
||||
this.register = 1
|
||||
this.registerStep = 1
|
||||
},
|
||||
goLogin() {
|
||||
this.register = 0
|
||||
this.registerStep = 0
|
||||
},
|
||||
registerStep1() {
|
||||
|
||||
if (!this.check) {
|
||||
this.$message({
|
||||
message: '请阅读并同意《宇信通服务协议》与《隐私协议》',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
|
||||
registUser(this.registerInfo).then((response) => {
|
||||
if (response.code == 200) {
|
||||
loading.close()
|
||||
|
||||
this.companyList = response.data.sysOrganizationVos
|
||||
this.registerInfo.userSid = response.data.sid
|
||||
|
||||
if (this.companyList.length == 0) {
|
||||
// 1. 新用户 无关联企业
|
||||
this.registerStep = 3
|
||||
} else {
|
||||
// 2. 注册过 选择企业登录
|
||||
this.registerStep = 2
|
||||
}
|
||||
|
||||
} else {
|
||||
loading.close()
|
||||
}
|
||||
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
|
||||
},
|
||||
registerStep2() {
|
||||
|
||||
this.registerStep = 3
|
||||
|
||||
},
|
||||
registerStep3() {
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
bindOrganization(this.registerInfo).then((response) => {
|
||||
|
||||
if (response.code == 200) {
|
||||
|
||||
this.$router.push({
|
||||
path: '/index'
|
||||
})
|
||||
|
||||
loading.close()
|
||||
|
||||
window.sessionStorage.setItem('token', response.data.token)
|
||||
window.sessionStorage.setItem('sid', response.data.sid)
|
||||
window.sessionStorage.setItem('staffSid', response.data.staffSid)
|
||||
window.sessionStorage.setItem('userName', response.data.userName)
|
||||
window.sessionStorage.setItem('orgName', response.data.orgName)
|
||||
window.sessionStorage.setItem('mobile', response.data.mobile)
|
||||
window.sessionStorage.setItem('orgSid', response.data.orgSid)
|
||||
window.sessionStorage.setItem('orgSid', response.data.orgSid)
|
||||
window.sessionStorage.setItem('departmentName', response.data.departmentName)
|
||||
window.sessionStorage.setItem('departmentSid', response.data.departmentSid)
|
||||
window.sessionStorage.setItem('orgNamePath', response.data.orgNamePath)
|
||||
window.sessionStorage.setItem('orgSidPath', response.data.orgSidPath)
|
||||
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', response.data
|
||||
.pNameAndDepartmentNameAndPostName)
|
||||
}
|
||||
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
|
||||
},
|
||||
itemClick(item) {
|
||||
console.log(" itemClick", item)
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
|
||||
var params = {
|
||||
userSid: this.registerInfo.userSid,
|
||||
orgSid: item.orgSid
|
||||
}
|
||||
|
||||
selOrganization(params).then((response) => {
|
||||
|
||||
if (response.code == 200) {
|
||||
|
||||
this.$router.push({
|
||||
path: '/index'
|
||||
})
|
||||
|
||||
loading.close()
|
||||
|
||||
window.sessionStorage.setItem('token', response.data.token)
|
||||
window.sessionStorage.setItem('sid', response.data.sid)
|
||||
window.sessionStorage.setItem('staffSid', response.data.staffSid)
|
||||
window.sessionStorage.setItem('userName', response.data.userName)
|
||||
window.sessionStorage.setItem('orgName', response.data.orgName)
|
||||
window.sessionStorage.setItem('mobile', response.data.mobile)
|
||||
window.sessionStorage.setItem('orgSid', response.data.orgSid)
|
||||
window.sessionStorage.setItem('departmentName', response.data.departmentName)
|
||||
window.sessionStorage.setItem('departmentSid', response.data.departmentSid)
|
||||
window.sessionStorage.setItem('orgNamePath', response.data.orgNamePath)
|
||||
window.sessionStorage.setItem('orgSidPath', response.data.orgSidPath)
|
||||
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', response.data
|
||||
.pNameAndDepartmentNameAndPostName)
|
||||
}
|
||||
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
getUserInfo(id) {
|
||||
getUserById(id).then((response) => {
|
||||
if (response.code == 200) {
|
||||
@@ -192,8 +606,7 @@
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
<style lang="scss">
|
||||
// .el-input__inner {
|
||||
// border: none;
|
||||
// color: #000;
|
||||
@@ -246,6 +659,13 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.main-right-title2 {
|
||||
margin-top: 40px;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
color: #467CCF;
|
||||
}
|
||||
|
||||
.main-right-table {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -372,6 +792,65 @@
|
||||
}
|
||||
}
|
||||
|
||||
.registerStep1 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 65%;
|
||||
|
||||
.input {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.main-right-title2 {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
color: #467CCF;
|
||||
}
|
||||
|
||||
.sendCode1 {
|
||||
font-size: 16px;
|
||||
color: #c9c9c9;
|
||||
}
|
||||
|
||||
.sendCode2 {
|
||||
font-size: 16px;
|
||||
color: #3E77CD;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.registerStep2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 70%;
|
||||
|
||||
.input {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.main-right-title {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.registerStep3 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 70%;
|
||||
|
||||
.input {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,427 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="收货单管理" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="单据编号">
|
||||
<el-input v-model="queryParams.params.billNo" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期">
|
||||
<el-date-picker v-model="queryParams.params.createTimeStart" type="date" placeholder="选择日期"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>至
|
||||
<el-date-picker v-model="queryParams.params.createTimeEnd" type="date" placeholder="选择日期"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源单号">
|
||||
<el-input v-model="queryParams.params.sourceBillNo" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型">
|
||||
<el-select v-model="queryParams.params.busTypeKey" placeholder="请选择">
|
||||
<el-option v-for="(item,i) in busTypeList" :key="i" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="queryParams.params.supplierName" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="到货日期">
|
||||
<el-date-picker v-model="queryParams.params.deliveryDateStart" type="date" placeholder="选择日期"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker v-model="queryParams.params.deliveryDateEnd" type="date" placeholder="选择日期"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-select v-model="queryParams.params.billState" placeholder="请选择">
|
||||
<el-option v-for="(item,i) in billStateList" :key="i" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">收货单列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"
|
||||
@selection-change="selectionLineChangeHandle">
|
||||
<el-table-column fixed width="50" type="selection" align="center" />
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column fixed label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" :disabled="scope.row.billState=='完成'"
|
||||
@click="toEdit(scope.row)">办理</el-button>
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="billNo" label="单据编号" align="center" />
|
||||
<el-table-column prop="createTime" label="单据日期" align="center" />
|
||||
<el-table-column prop="createByName" label="制单人" align="center" />
|
||||
<el-table-column prop="sourceBillNo" label="来源单号" align="center" />
|
||||
<el-table-column prop="busTypeValue" label="业务类型" align="center" />
|
||||
<el-table-column prop="supplierName" label="供应商" align="center" />
|
||||
<el-table-column prop="deliveryDate" label="到货日期" align="center" />
|
||||
<el-table-column prop="billState" label="单据状态" align="center" />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End 查询和其列表部分 -->
|
||||
<!-- 新增修改部分组件 -->
|
||||
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
|
||||
<divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" />
|
||||
<divAddupShelfRecord v-show="viewState == 5" ref="divAddupShelfRecord" @doback="resetState"
|
||||
@reloadlist="loadList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/receivingGoods/receivingGoods.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './receivingGoodsAdd.vue'
|
||||
import divInfo from './receivingGoodsInfo.vue'
|
||||
import divAddupShelfRecord from './upShelfAddRecord.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd,
|
||||
divInfo,
|
||||
divAddupShelfRecord
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formobj: {
|
||||
sid: "",
|
||||
reviewStatus: "",
|
||||
remarks: ''
|
||||
},
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAudit',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'danger',
|
||||
size: 'small',
|
||||
icon: 'del',
|
||||
btnKey: 'doDel',
|
||||
btnLabel: '删除'
|
||||
},
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增上架单'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: [],
|
||||
selectionList: [],
|
||||
busTypeList: [{
|
||||
name: "业务类型1",
|
||||
sid: "1"
|
||||
},
|
||||
{
|
||||
name: "业务类型2",
|
||||
sid: "2"
|
||||
}
|
||||
],
|
||||
billStateList: [{
|
||||
name: "新建",
|
||||
sid: "0"
|
||||
},
|
||||
{
|
||||
name: "完成",
|
||||
sid: "1"
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
saveExamine() {
|
||||
|
||||
},
|
||||
changeTheme() {
|
||||
|
||||
},
|
||||
toAudit() {
|
||||
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
|
||||
},
|
||||
selectTime1() {
|
||||
|
||||
},
|
||||
selectTime2() {
|
||||
|
||||
},
|
||||
selectionLineChangeHandle(val) {
|
||||
console.log("val", val);
|
||||
|
||||
this.selectionList = val
|
||||
const aa = []
|
||||
val.forEach(element => {
|
||||
aa.push(element.sid)
|
||||
})
|
||||
this.sids = aa
|
||||
|
||||
},
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAudit':
|
||||
this.toAudit()
|
||||
break
|
||||
case 'doDel':
|
||||
this.doDel()
|
||||
break
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
doDel() {
|
||||
|
||||
if (this.sids.length > 0) {
|
||||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteBySids(this.sids).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
} else {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '请至少选择一条记录进行删除操作'
|
||||
})
|
||||
}
|
||||
},
|
||||
toAdd() {
|
||||
if (this.selectionList.length != 1) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: "请选择一条数据。",
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (this.selectionList[0].billState == '完成') {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: "此记录已完成,不可操作。",
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.viewState = 5
|
||||
this.$refs['divAddupShelfRecord'].showEdit(this.selectionList[0])
|
||||
},
|
||||
toEdit(row) {
|
||||
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 4
|
||||
this.$refs['divinfo'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
req.updateIsEnable(sid, state).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态已更新',
|
||||
showClose: true
|
||||
})
|
||||
} else { // 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,308 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>收货单</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-form ref="form_obj" :model="formobj" label-position="top" label-width="190px" class="formadd">
|
||||
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
|
||||
<div>基础信息</div>
|
||||
</div>
|
||||
<el-row class="first_row">
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据编号</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.billNo}}</span>
|
||||
<!-- <el-input v-model="formobj.name" placeholder="" class="addinputw" style="width:100%" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">制单人姓名</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.createByName}}</span>
|
||||
<!-- <el-input v-model="formobj.preferentialPrice" placeholder="" class="addinputw" style="width:100%"
|
||||
clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">外部单号</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.sourceBillNo}}</span>
|
||||
<!-- <el-form-item class="trightb_item">
|
||||
<el-select v-model="GiftBagGood.goodsSkuSid" filterable clearable placeholder="请选择" style="width:100%"
|
||||
@change="orderTypeSelect">
|
||||
<el-option v-for="item in orderTypeList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据日期</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.createTime}}</span>
|
||||
<!-- <el-select v-model="GiftBagGood.goodsSkuSid" filterable clearable placeholder="请选择" style="width:100%"
|
||||
@change="businessTypeSelect">
|
||||
<el-option v-for="item in businessTypeList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">业务类型</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.busTypeValue}}</span>
|
||||
<!-- <el-input v-model="formobj.preferentialPrice" placeholder="" class="addinputw" style="width:100%"
|
||||
clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">供应商</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.supplierName}}</span>
|
||||
<!-- <el-date-picker v-model="formobj.dateEnd" type="date" style="width:100%" value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">到货日期</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.deliveryDate}}</span>
|
||||
<!-- <el-date-picker v-model="formobj.deliveryDate" type="date" style="width:100%" value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据状态</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.billState}}</span>
|
||||
<!-- <el-input v-model="formobj.remarks" placeholder="" class="addinputw"
|
||||
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="4" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">备注</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.remarks}}</span>
|
||||
<!-- <el-input v-model="formobj.remarks" placeholder="" class="addinputw"
|
||||
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="4" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<div class="title"
|
||||
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;">
|
||||
<div>商品列表</div>
|
||||
</div>
|
||||
<el-table v-loading="listLoading" :data="formobj.list" border style="width: 100%;"
|
||||
:row-style="{height: '40px'}">
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
|
||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" />
|
||||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" />
|
||||
<el-table-column label="单位" prop="unit" align="center" width="120" />
|
||||
<el-table-column label="仓库" prop="warehouseName" align="center" width="180" />
|
||||
<el-table-column label="库位" prop="warehouseRackName" align="center" width="180" />
|
||||
<el-table-column label="预约数量" prop="orderCount" align="center" width="120" />
|
||||
<el-table-column label="实收数量" prop="actualInCount" align="center" width="120" />
|
||||
<el-table-column label="拒收数量" prop="rejectCount" align="center" width="120" />
|
||||
<el-table-column label="拒收原因" prop="rejectReason" align="center" width="180" />
|
||||
<el-table-column label="是否质检" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-radio-group v-model="scope.row.isQuality" :disabled="true" size="small">
|
||||
<el-radio :label="0">需要</el-radio>
|
||||
<el-radio :label="1">不需要</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检状态" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-radio-group v-model="scope.row.qualityState" :disabled="true" size="small">
|
||||
<el-radio :label="0">合格</el-radio>
|
||||
<el-radio :label="1">不合格</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="载具说明" prop="packageRemark" align="center" width="180" />
|
||||
<el-table-column label="入库价" prop="cost" align="center" width="100" />
|
||||
<el-table-column label="税额" prop="taxAmount" align="center" width="100" />
|
||||
<el-table-column label="含税单价" prop="taxPrice" align="center" width="100" />
|
||||
<el-table-column label="入库金额" prop="amount" align="center" width="100" />
|
||||
</el-table>
|
||||
|
||||
|
||||
<div class="title"
|
||||
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;">
|
||||
<div>商品-批次</div>
|
||||
</div>
|
||||
<el-table v-loading="listLoading" :data="formobj.pcList" border style="width: 100%;"
|
||||
:row-style="{height: '40px'}">
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column label="商品列表序号" prop="xh" align="center" width="120" />
|
||||
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
|
||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" />
|
||||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" />
|
||||
<el-table-column label="单位" prop="unit" align="center" width="120" />
|
||||
<el-table-column label="仓库" prop="warehouseName" align="center" width="150" />
|
||||
<el-table-column label="库位" prop="warehouseRackName" align="center" width="150" />
|
||||
<el-table-column label="批次号" prop="batchNumber" align="center" width="300" />
|
||||
<el-table-column label="生产日期" prop="manufactureDate" align="center" width="180" />
|
||||
<el-table-column label="有效期" prop="expirationDate" align="center" width="180" />
|
||||
<el-table-column label="数量" prop="batchCount" align="center" width="120" />
|
||||
</el-table>
|
||||
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/receivingGoods/receivingGoods.js'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
listLoading: false,
|
||||
submitdisabled: false,
|
||||
formobj: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
indexMethod(index) {
|
||||
return index + 1
|
||||
},
|
||||
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.$emit('doback')
|
||||
},
|
||||
|
||||
showAdd() {
|
||||
|
||||
},
|
||||
showEdit(row) {
|
||||
|
||||
var params = {
|
||||
sid: row.sid
|
||||
}
|
||||
req.init(params)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = {}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// 隐藏上传组件
|
||||
|
||||
::v-deep .hide {
|
||||
.el-upload--picture-card {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.trightb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.trightb_item {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.span {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-left: 50px;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
border: 1px #fff solid;
|
||||
padding: 0px 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__header {
|
||||
height: 40px;
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
text-align: left;
|
||||
color: #ffffff;
|
||||
background-color: #0294d7;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -1,541 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>【新增】上架单</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-form ref="form_obj" :model="formobj" label-position="top" label-width="190px" class="formadd">
|
||||
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
|
||||
<div>基础信息</div>
|
||||
</div>
|
||||
<el-row class="first_row">
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据编号</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.billNo}}</span>
|
||||
<!-- <el-input v-model="formobj.name" placeholder="" class="addinputw" style="width:100%" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">制单人姓名</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<!-- <span slot="label">{{formobj.createByName}}</span> -->
|
||||
<el-input v-model="formobj.createByName" placeholder="" class="addinputw" style="width:100%" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">外部单号</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.sourceBillNo}}</span>
|
||||
<!-- <el-form-item class="trightb_item">
|
||||
<el-select v-model="GiftBagGood.goodsSkuSid" filterable clearable placeholder="请选择" style="width:100%"
|
||||
@change="orderTypeSelect">
|
||||
<el-option v-for="item in orderTypeList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据日期</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<!-- <span slot="label">{{formobj.createTime}}</span> -->
|
||||
<el-date-picker v-model="formobj.createTime" type="date" style="width:100%" value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据状态</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.billState}}</span>
|
||||
<!-- <el-input v-model="formobj.remarks" placeholder="" class="addinputw"
|
||||
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="4" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">备注</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-form-item class="trightb_item">
|
||||
<!-- <span slot="label">{{formobj.supplierName}}</span> -->
|
||||
<el-input v-model="formobj.remarks" placeholder="" class="addinputw"
|
||||
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="1" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<div class="title"
|
||||
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;">
|
||||
<div>商品列表</div>
|
||||
</div>
|
||||
<el-table v-loading="listLoading" :data="formobj.pcList" border style="width: 100%;"
|
||||
:row-style="{height: '40px'}">
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column fixed label="操作" wid align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="doGoodsBatch(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
|
||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" />
|
||||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" />
|
||||
<el-table-column label="单位" prop="unit" align="center" width="120" />
|
||||
<el-table-column label="仓库" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.warehouseName" placeholder="请选择" clearable
|
||||
@change="selectWarehouseName(scope.row,$event)">
|
||||
<el-option v-for="(item,i) in warehouseList" :key="i" :label="item.warehouseName" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库位" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.warehouseRackName" :disabled="scope.row.warehouseName==''" clearable
|
||||
@focus="getWarehouseAreaList(scope.row.warehouseSid)" placeholder="请选择"
|
||||
@change="selectWarehouseAreaCode">
|
||||
<el-option v-for="(item,i) in warehouseRackList" :key="i" :label="item.areaCode" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次号" prop="batchNumber" align="center" width="300" />
|
||||
<el-table-column label="上架数量" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-input ref="focusAssumptionInput" v-model="scope.row.actualCount" clearable placeholder=""
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="载具编号" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-input ref="focusAssumptionInput" v-model="scope.row.packageNo" clearable placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/receivingGoods/receivingGoods.js'
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
listLoading: false,
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
"sid": "",
|
||||
"billNo": "",
|
||||
"createBySid": "",
|
||||
"createByName": "",
|
||||
"createTime": "",
|
||||
"sourceBillNo": "",
|
||||
"sourceBillSid": "",
|
||||
"billState": "新建",
|
||||
"list": [
|
||||
|
||||
],
|
||||
"remarks": ""
|
||||
},
|
||||
hideUploadBtn: false,
|
||||
busTypeList: [{
|
||||
name: "业务类型1",
|
||||
sid: "1"
|
||||
},
|
||||
{
|
||||
name: "业务类型2",
|
||||
sid: "2"
|
||||
}
|
||||
],
|
||||
supplierList: [],
|
||||
warehouseList: [],
|
||||
warehouseRackList: []
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
|
||||
methods: {
|
||||
doGoodsDel(sid) {
|
||||
console.log("doGoodsDel》》》》", sid)
|
||||
|
||||
this.$confirm("是否确定删除此商品?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const index = this.formobj.list.findIndex((item) => item.goodSpuSid === sid)
|
||||
console.log("index》》》》", index)
|
||||
this.formobj.list.splice(index, 1)
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
indexMethod(index) {
|
||||
return index + 1
|
||||
},
|
||||
saveOrUpdate() {
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
||||
|
||||
this.submitdisabled = true
|
||||
req.saveUpShelf(this.formobj)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.submitdisabled = false
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: resp.msg
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
this.submitdisabled = false
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.submitdisabled = false
|
||||
})
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.formobj = {
|
||||
"sid": "",
|
||||
"billNo": "",
|
||||
"createBySid": "",
|
||||
"createByName": "",
|
||||
"createTime": "",
|
||||
"sourceBillNo": "",
|
||||
"sourceBillSid": "",
|
||||
"billState": "新建",
|
||||
"list": [
|
||||
|
||||
],
|
||||
"remarks": ""
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
|
||||
showAdd() {
|
||||
|
||||
},
|
||||
showEdit(row) {
|
||||
|
||||
var params = {
|
||||
sid: row.sid
|
||||
}
|
||||
|
||||
req.init(params)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = {}
|
||||
})
|
||||
},
|
||||
busTypeSelect(val) {
|
||||
|
||||
},
|
||||
supplierNameSelect(val) {
|
||||
|
||||
},
|
||||
getWarehouseList() {
|
||||
req2.getWarehouses().then((res) => {
|
||||
if (res.success) {
|
||||
this.warehouseList = res.data
|
||||
|
||||
console.log("aaaaaa", this.warehouseList);
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getWarehouseAreaList(sid) {
|
||||
var query = {
|
||||
ckSid: sid
|
||||
}
|
||||
req2.getWarehouseareas(query).then((res) => {
|
||||
if (res.success) {
|
||||
this.warehouseRackList = res.data
|
||||
|
||||
console.log("aaaaaa", this.warehouseRackList);
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
selectWarehouseName(row, val) {
|
||||
console.log("selectWarehouseName", row);
|
||||
console.log("selectWarehouseName", val);
|
||||
const choose = this.warehouseList.filter((item) => item.sid == val)
|
||||
console.log('>>>>>>>>>selectWarehouseName', choose)
|
||||
row.warehouseName = choose[0].warehouseName
|
||||
row.warehouseSid = choose[0].sid
|
||||
|
||||
},
|
||||
selectWarehouseAreaCode(val) {
|
||||
console.log("selectWarehouseAreaCode", val);
|
||||
|
||||
const choose = this.warehouseRackList.filter((item) => item.sid == val)
|
||||
console.log('>>>>>>>>>selectWarehouseAreaCode', choose)
|
||||
row.warehouseRackName = choose[0].areaCode
|
||||
row.warehouseRackSid = choose[0].sid
|
||||
|
||||
},
|
||||
|
||||
batchAddAll() {
|
||||
|
||||
for (var i = 0; i < this.formobj.list.length; i++) {
|
||||
var item = this.formobj.list[i]
|
||||
|
||||
var info = {
|
||||
xh: i + 1,
|
||||
goodsSkuSid: item.goodsSkuSid,
|
||||
goodsSkuTitle: item.goodsSkuTitle,
|
||||
goodsSkuCode: item.goodsSkuCode,
|
||||
goodsSkuOwnSpec: item.goodsSkuOwnSpec,
|
||||
unit: item.unit,
|
||||
warehouseSid: item.warehouseSid,
|
||||
warehouseName: item.warehouseName,
|
||||
warehouseRackSid: item.warehouseRackSid,
|
||||
warehouseRackName: item.warehouseRackName,
|
||||
shelfLife: item.shelfLife,
|
||||
orderCount: item.orderCount,
|
||||
batchNumber: '',
|
||||
manufactureDate: '',
|
||||
batchCount: 0,
|
||||
}
|
||||
|
||||
this.formobj.pcList.push(info)
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
doGoods(row) {
|
||||
console.log("doGoodsDel》》》》", row)
|
||||
|
||||
this.$confirm("是否确定删除此商品?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const index = this.formobj.list.findIndex((item) => item === row)
|
||||
console.log("index》》》》", index)
|
||||
this.formobj.list.splice(index, 1)
|
||||
|
||||
for (var i = this.formobj.pcList.length - 1; i >= 0; i--) {
|
||||
if (this.formobj.pcList[i].number === (index + 1)) {
|
||||
this.formobj.pcList.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
doGoodsBatch(row) {
|
||||
console.log("doGoodsDel》》》》", row)
|
||||
|
||||
this.$confirm("是否确定删除此商品批次?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const index = this.formobj.pcList.findIndex((item) => item === row)
|
||||
console.log("index》》》》", index)
|
||||
this.formobj.pcList.splice(index, 1)
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
manufactureDateChange(row, val) {
|
||||
|
||||
console.log("manufactureDateChange》》》》", val)
|
||||
|
||||
row.manufactureDate = val
|
||||
row.expirationDate = this.addDate(val, row.shelfLife)
|
||||
|
||||
let reg = new RegExp('-', 'g') //g代表全部
|
||||
|
||||
row.batchNumber = this.formobj.deliveryDate.replace(reg, '') + " - " + row.expirationDate.replace(reg, '')
|
||||
|
||||
|
||||
|
||||
this.$forceUpdate(); // 强制更新
|
||||
console.log("manufactureDateChange》》》》", row)
|
||||
|
||||
},
|
||||
|
||||
addDate(date, days) {
|
||||
var dates = new Date(date)
|
||||
dates.setDate(dates.getDate() + days)
|
||||
var year = dates.getFullYear()
|
||||
var month = dates.getMonth() + 1
|
||||
var day = dates.getDate()
|
||||
if (month < 9) {
|
||||
month = "0" + month
|
||||
}
|
||||
if (day < 9) {
|
||||
day = "0" + day
|
||||
}
|
||||
var time = year + '-' + month + '-' + day
|
||||
return time
|
||||
},
|
||||
|
||||
doAddBatch(row) {
|
||||
const index = (this.formobj.list.findIndex((item) => item === row)) + 1
|
||||
console.log("doAddBatch》》》》", index)
|
||||
console.log("doAddBatch》》》》", row)
|
||||
|
||||
var info = {
|
||||
xh: index,
|
||||
goodsSkuSid: row.goodsSkuSid,
|
||||
goodsSkuTitle: row.goodsSkuTitle,
|
||||
goodsSkuCode: row.goodsSkuCode,
|
||||
goodsSkuOwnSpec: row.goodsSkuOwnSpec,
|
||||
unit: row.unit,
|
||||
warehouseSid: row.warehouseSid,
|
||||
warehouseName: row.warehouseName,
|
||||
warehouseRackSid: row.warehouseRackSid,
|
||||
warehouseRackName: row.warehouseRackName,
|
||||
shelfLife: row.shelfLife,
|
||||
orderCount: row.orderCount,
|
||||
batchNumber: '',
|
||||
manufactureDate: '',
|
||||
batchCount: 0,
|
||||
}
|
||||
|
||||
console.log("aaaaaaaaaaa", info);
|
||||
|
||||
this.formobj.pcList.push(info)
|
||||
|
||||
},
|
||||
commodityComputeYHAndXSJE(row, val) {
|
||||
console.log("aaa", row);
|
||||
console.log("aaa", val);
|
||||
|
||||
if (Number(row.actualInCount) > Number(row.orderCount)) {
|
||||
row.actualInCount = row.orderCount
|
||||
|
||||
}
|
||||
row.amount = (Number(row.actualInCount) * Number(row.taxPrice)).toFixed(2)
|
||||
},
|
||||
|
||||
commodityComputeYHAndXSJE2(row, val) {
|
||||
console.log("aaa", row);
|
||||
console.log("aaa", val);
|
||||
|
||||
if ((Number(row.rejectCount) + Number(row.actualInCount)) > Number(row.orderCount)) {
|
||||
row.rejectCount = Number(row.orderCount) - Number(row.actualInCount)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
commodityComputeYHAndXSJE3(row, val) {
|
||||
console.log("aaa", row);
|
||||
console.log("aaa", val);
|
||||
|
||||
row.taxPrice = (Number(row.cost) * Number(row.taxAmount)).toFixed(2)
|
||||
row.amount = (Number(row.actualInCount) * Number(row.taxPrice)).toFixed(2)
|
||||
},
|
||||
|
||||
commodityComputeYHAndXSJE4(row, val) {
|
||||
console.log("aaa", row);
|
||||
console.log("aaa", val);
|
||||
|
||||
row.taxPrice = (Number(row.cost) * Number(row.taxAmount)).toFixed(2)
|
||||
row.amount = (Number(row.actualInCount) * Number(row.taxPrice)).toFixed(2)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// 隐藏上传组件
|
||||
|
||||
::v-deep .hide {
|
||||
.el-upload--picture-card {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.trightb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.trightb_item {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.span {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-left: 50px;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
border: 1px #fff solid;
|
||||
padding: 0px 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__header {
|
||||
height: 40px;
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
text-align: left;
|
||||
color: #ffffff;
|
||||
background-color: #0294d7;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -1,236 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--列表页面-->
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar view-title="库龄查询" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
|
||||
<!--Start查询列表部分-->
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
|
||||
<el-form-item label="商品名称">
|
||||
<el-input v-model="listQuery.params.goodsSpuName" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件号">
|
||||
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库">
|
||||
<el-input v-model="listQuery.params.warehouseName" placeholder="" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库日期">
|
||||
<el-date-picker v-model="listQuery.params.startDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
|
||||
<span style="padding: 0 8px">至</span>
|
||||
<el-date-picker v-model="listQuery.params.endDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="库龄">
|
||||
<el-date-picker v-model="listQuery.params.ageStart" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
|
||||
<span style="padding: 0 8px">至</span>
|
||||
<el-date-picker v-model="listQuery.params.ageEnd" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--End查询列表部分-->
|
||||
<div class="listtop">
|
||||
<div class="tit">库龄查询列表</div>
|
||||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
|
||||
</div>
|
||||
<!--Start 主页面主要部分 -->
|
||||
<div class="">
|
||||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;">
|
||||
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
|
||||
<el-table-column fixed prop="goodsSpuName" label="商品" align="center" width="150"/>
|
||||
<el-table-column prop="goodsSkuCode" label="零件号" align="center"/>
|
||||
<el-table-column prop="unit" label="计量单位" align="center" width="100" />
|
||||
<el-table-column prop="warehouseName" label="仓库" align="center"/>
|
||||
<el-table-column prop="warehouseArea" label="库区" align="center"/>
|
||||
<el-table-column prop="count" label="库存数量" align="center" width="100" />
|
||||
<el-table-column prop="billNo" label="入库单号" align="center"/>
|
||||
<el-table-column prop="firstInDate" label="入库日期" align="center" width="120"/>
|
||||
<el-table-column prop="goodsSkuOwnSpec" label="规格型号" align="center"/>
|
||||
<el-table-column prop="warehouseRackName" label="货架" align="center"/>
|
||||
</el-table>
|
||||
</div>
|
||||
<!--End 主页面主要部分-->
|
||||
<div class="pages">
|
||||
<div class="tit"/>
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
|
||||
</div>
|
||||
<!--End查询列表部分-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import req from '@/api/storageage/storageage'
|
||||
|
||||
export default {
|
||||
name: 'StorageAge',
|
||||
components: {
|
||||
Pagination,
|
||||
pageye,
|
||||
ButtonBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
btnList: [
|
||||
{
|
||||
type: 'success',
|
||||
size: 'small',
|
||||
icon: 'export',
|
||||
btnKey: 'doExport',
|
||||
btnLabel: '导出'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看
|
||||
tableKey: 0,
|
||||
list: [],
|
||||
sids: [], // 用于导出的时候保存已选择的SIDs
|
||||
FormLoading: false,
|
||||
listLoading: false,
|
||||
// 翻页
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
warehouseName: '',
|
||||
goodsSpuName: '',
|
||||
goodsSkuCode: '',
|
||||
ageStart: '',
|
||||
ageEnd: '',
|
||||
useOrgSid: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 初始化变量
|
||||
this.getList()
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
console.log('XXXXXXXXXXXXXXX ' + btnKey)
|
||||
switch (btnKey) {
|
||||
case 'doExport':
|
||||
this.doExport()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
// 表中序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
// 查询列表信息
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
req.listPage(this.listQuery).then(response => {
|
||||
this.listLoading = false
|
||||
if (response.success) {
|
||||
this.list = response.data.records
|
||||
this.listQuery.total = response.data.total
|
||||
} else {
|
||||
this.list = []
|
||||
this.listQuery.total = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询按钮
|
||||
handleFilter() {
|
||||
this.listQuery.current = 1
|
||||
this.getList()
|
||||
},
|
||||
// 点击重置
|
||||
handleReset() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
warehouseName: '',
|
||||
goodsSpuName: '',
|
||||
goodsSkuCode: '',
|
||||
ageStart: '',
|
||||
ageEnd: '',
|
||||
useOrgSid: ''
|
||||
}
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
doExport() {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.exportExcel(this.listQuery.params).then((resp) => {
|
||||
loading.close()
|
||||
const blob = new Blob([resp], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const fileName = '库龄查询表' + '.xls'
|
||||
const elink = document.createElement('a')
|
||||
elink.download = fileName
|
||||
elink.style.display = 'nonde'
|
||||
elink.href = URL.createObjectURL(blob)
|
||||
document.body.appendChild(elink)
|
||||
elink.click()
|
||||
URL.revokeObjectURL(elink.href)
|
||||
document.body.removeChild(elink)
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
248
src/views/system/dictManage/dictCommon.vue
Normal file
248
src/views/system/dictManage/dictCommon.vue
Normal file
@@ -0,0 +1,248 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div v-show="viewState == 1">
|
||||
<div class="tab-header">
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="14">
|
||||
<el-form-item label="数据value">
|
||||
<el-input v-model="page.params.dictValue" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item style="float: right;">
|
||||
<el-button type="primary" @click="onSearch()">查 询</el-button>
|
||||
<el-button @click="add()">添 加</el-button>
|
||||
<el-button @click="closeDict">返 回</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table :data="tableData" border style="width: 100%;">
|
||||
<el-table-column label="序号" width="50px" type="index" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="280px">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button type="primary" size="mini" @click="add(scope.row)">-->
|
||||
<!-- 添加子级-->
|
||||
<!-- </el-button>-->
|
||||
<el-button type="primary" size="mini" @click="editRow(scope.row)">
|
||||
修改
|
||||
</el-button>
|
||||
<el-button type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleMap(scope.row)">
|
||||
映射
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dictType" label="字典分类编码" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="groupName" label="数据分组" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="dictKey" label="数据key" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="dictValue" label="数据value" align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/>
|
||||
|
||||
<!-- 分类编辑 -->
|
||||
<el-dialog :title="dialogTitle + '字典数据'" :visible.sync="editDialog" width="50%">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>字典分类编码</td>
|
||||
<td>
|
||||
{{ form.dictType }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>数据分组</td>
|
||||
<td>
|
||||
<el-input v-model="form.groupName"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>数据key</td>
|
||||
<td>
|
||||
<el-input v-model="form.dictKey"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>数据value</td>
|
||||
<td>
|
||||
<el-input v-model="form.dictValue"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="save()">保 存</el-button>
|
||||
<el-button @click="editDialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<dictMap v-show="viewState == 2" ref="divAdd" @doback="resetState"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { deldictCommon, dictCommonList, putdictCommon, savedictCommon } from '@/api/system/dictType/dictCommon.js'
|
||||
import dictMap from './dictMap'
|
||||
export default {
|
||||
components: {
|
||||
dictMap
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editDialog: false,
|
||||
dialogTitle: '',
|
||||
viewState: 1,
|
||||
form: {
|
||||
dictKey: '',
|
||||
dictType: '',
|
||||
groupName: '',
|
||||
dictValue: '',
|
||||
parentSid: ''
|
||||
},
|
||||
page: {
|
||||
total: 0, // 默认数据总数
|
||||
current: 1, // 默认开始页面
|
||||
size: 10, // 每页的数据条数
|
||||
params: {
|
||||
dictKey: '',
|
||||
dictType: '',
|
||||
dictValue: '',
|
||||
parentSid: '',
|
||||
sidPath: '',
|
||||
}
|
||||
},
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
props: ['dictData'],
|
||||
watch: {
|
||||
dictData: {
|
||||
handler(val) {
|
||||
this.form.parentSid = val.sid
|
||||
this.form.dictType = val.dictType
|
||||
this.form.groupName = val.groupName
|
||||
this.page.params.parentSid = val.sid
|
||||
this.page.params.dictType = val.dictType
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// if (this.$route.query.sid) {
|
||||
// sessionStorage.setItem('dictType', this.$route.query.dictType);
|
||||
// sessionStorage.setItem('parentSid', this.$route.query.sid);
|
||||
// this.page.params.dictType = this.$route.query.dictType
|
||||
// this.page.params.parentSid = this.$route.query.sid
|
||||
// this.form.dictType = this.$route.query.dictType;
|
||||
// this.form.parentSid = this.$route.query.sid
|
||||
// } else {
|
||||
// this.page.params.dictType = sessionStorage.getItem('dictType');
|
||||
// this.page.params.parentSid = sessionStorage.getItem('parentSid');
|
||||
// this.form.dictType = sessionStorage.getItem('dictType');
|
||||
// this.form.parentSid = sessionStorage.getItem('parentSid');
|
||||
// }
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
methods: {
|
||||
pagination(val) { // 分页
|
||||
this.page.current = val.pageNum
|
||||
this.page.size = val.pageSize
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
onSearch() { // 查询
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
resetSearch() { // 重置
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
getPageList(data) { // 获取列表
|
||||
dictCommonList(data).then((res) => {
|
||||
this.tableData = res.data.records
|
||||
this.page.total = res.data.total
|
||||
})
|
||||
},
|
||||
add(row) {
|
||||
if (row) {
|
||||
this.form.dictType = row.dictType
|
||||
this.form.parentSid = row.sid
|
||||
} else {
|
||||
this.form.parentSid = 0
|
||||
// this.form.dictType = row.dictType
|
||||
}
|
||||
this.dialogTitle = '新增'
|
||||
this.editDialog = true
|
||||
this.form.dictKey = ''
|
||||
this.form.groupName = ''
|
||||
this.form.dictValue = ''
|
||||
this.form.sid = ''
|
||||
},
|
||||
closeDict() {
|
||||
this.form.parentSid = ''
|
||||
this.form.dictType = ''
|
||||
this.form.groupName = ''
|
||||
this.page.params.parentSid = ''
|
||||
this.page.params.dictType = ''
|
||||
this.$emit('doback')
|
||||
},
|
||||
editRow(row) {
|
||||
this.dialogTitle = '编辑'
|
||||
this.editDialog = true
|
||||
this.form = Object.assign({}, row)
|
||||
},
|
||||
save() {
|
||||
if (this.form.sid) {
|
||||
putdictCommon(this.form).then(res => {
|
||||
this.editDialog = false
|
||||
this.getPageList(this.page)
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
savedictCommon(this.form).then(res => {
|
||||
this.editDialog = false
|
||||
this.getPageList(this.page)
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
deleteRow(row) {
|
||||
this.$confirm('确定要删除该数据吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deldictCommon({ sid: row.sid }).then(res => {
|
||||
this.getPageList(this.page)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
handleMap(row) {
|
||||
this.viewState = 2
|
||||
this.$refs['divAdd'].showAdd(row)
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
200
src/views/system/dictManage/dictManage.vue
Normal file
200
src/views/system/dictManage/dictManage.vue
Normal file
@@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div v-show="viewState == 1">
|
||||
<div class="tab-header">
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="分类名称">
|
||||
<el-input clearable v-model="page.params.dictTypeName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="说明">
|
||||
<el-input clearable v-model="page.params.remarks"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item style="float: right;">
|
||||
<el-button type="primary" @click="onSearch()">查询</el-button>
|
||||
<el-button @click="add()">添加</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table :data="tableData" border style="width: 100%;">
|
||||
<el-table-column label="序号" width="80px" type="index" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="guanli(scope.row)">
|
||||
管理
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini" @click="editRow(scope.row)">
|
||||
修改
|
||||
</el-button>
|
||||
<el-button type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dictTypeCode" label="字典分类编码" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="dictTypeName" label="字典分类名称" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="remarks" label="说明" align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/>
|
||||
<!-- 分类编辑 -->
|
||||
<el-dialog :title="dialogTitle + '字典分类'" :visible.sync="editDialog" width="50%">
|
||||
<el-form>
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>数据字典code</td>
|
||||
<td>
|
||||
<el-input v-model="form.dictTypeCode"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>数据分类名称</td>
|
||||
<td>
|
||||
<el-input v-model="form.dictTypeName"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>说明</td>
|
||||
<td>
|
||||
<el-input type="textarea" v-model="form.remarks"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="save()">保 存</el-button>
|
||||
<el-button @click="editDialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<dict-common @doback="resetState" :dictData='dictData' v-show="viewState == 2"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { pageList, saveDictType, putDictType, delDictType } from '@/api/system/dictType/index.js'
|
||||
import dictCommon from './dictCommon.vue'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
editDialog: false,
|
||||
dialogTitle: '',
|
||||
form: {},
|
||||
formBackup: Object.assign({}, this.form),
|
||||
page: {
|
||||
total: 0, // 默认数据总数
|
||||
current: 1, // 默认开始页面
|
||||
size: 10, // 每页的数据条数
|
||||
params: {
|
||||
dictTypeName: '',
|
||||
dictTypeCode: ''
|
||||
}
|
||||
},
|
||||
tableData: [],
|
||||
viewState: 1,
|
||||
dictData: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
dictCommon
|
||||
},
|
||||
mounted() {
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
methods: {
|
||||
pagination(val) { // 分页
|
||||
this.page.current = val.pageNum
|
||||
this.page.size = val.pageSize
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
onSearch() { // 查询
|
||||
this.getPageList()
|
||||
},
|
||||
resetSearch() { // 重置
|
||||
this.page.current = 1
|
||||
this.getPageList()
|
||||
},
|
||||
getPageList() { // 获取列表
|
||||
pageList(this.page).then((res) => {
|
||||
if (res.success) {
|
||||
this.tableData = res.data.records
|
||||
this.page.total = res.data.total
|
||||
} else {
|
||||
this.tableData = []
|
||||
this.page.total = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
add() {
|
||||
this.dialogTitle = '新增'
|
||||
this.editDialog = true
|
||||
this.form = Object.assign({}, this.formBackup)
|
||||
},
|
||||
editRow(row) {
|
||||
this.dialogTitle = '编辑'
|
||||
this.editDialog = true
|
||||
this.form = Object.assign({}, row)
|
||||
},
|
||||
save() {
|
||||
if (this.form.sid) {
|
||||
putDictType(this.form).then(res => {
|
||||
this.editDialog = false
|
||||
this.getPageList(this.page)
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
saveDictType(this.form).then(res => {
|
||||
this.editDialog = false
|
||||
this.getPageList(this.page)
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
deleteRow(row) {
|
||||
this.$confirm('确定要删除该条数据吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delDictType({ sid: row.sid }).then(res => {
|
||||
this.getPageList(this.page)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
guanli(row) {
|
||||
this.dictData = { dictType: row.dictTypeCode }
|
||||
this.viewState = 2
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped="scoped">
|
||||
.my-tabs {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
155
src/views/system/dictManage/dictMap.vue
Normal file
155
src/views/system/dictManage/dictMap.vue
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<div class="app-app-container">
|
||||
<div class="tab-header webtop">
|
||||
<!--标题-->
|
||||
<div>{{ viewTitle }}</div>
|
||||
<!--start 添加修改按钮-->
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存
|
||||
</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="listconadd">
|
||||
<el-form ref="form_obj" class="formadd" :model="formobj">
|
||||
<div class="title">
|
||||
<div>[{{ dictionariesKey }}+{{dictionariesValue}}]映射列表</div>
|
||||
<el-button type="primary" size="mini" @click="Add">添加</el-button>
|
||||
</div>
|
||||
<el-table :key="tableKey" :data="formobj.listDtos" :index="index" border style="width: 100%">
|
||||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
|
||||
<el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="映射来源" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.map_sourceValue" filterable placeholder="" @change="changeSource($event, scope.row)">
|
||||
<el-option v-for="item in mappingsource_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="映射实体名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.map_object" placeholder="" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="映射项目类别" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.map_item" placeholder="" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="映射项目编码" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.map_itemKey" placeholder="" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="映射项目值" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.map_itemValue" placeholder="" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { typeValues } from '@/api/system/roleAdminister/index'
|
||||
import { saveMappingList, selectMappingListInfo } from '@/api/system/dictType/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return{
|
||||
viewTitle: '数据字典-映射管理',
|
||||
tableKey: 0,
|
||||
index: 0,
|
||||
dictionariesKey: '',
|
||||
dictionariesValue: '',
|
||||
mappingsource_list: [],
|
||||
formobj: {
|
||||
userSid: '',
|
||||
dictSid: '',
|
||||
listDtos: []
|
||||
},
|
||||
submitdisabled: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showAdd(row) {
|
||||
this.formobj.dictSid = row.sid
|
||||
this.dictionariesKey = row.dictType
|
||||
this.dictionariesValue = row.dictValue
|
||||
this.formobj.userSid = window.sessionStorage.getItem('userSid')
|
||||
typeValues({ type: 'sys_mappingsource' }).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.mappingsource_list = resp.data
|
||||
}
|
||||
})
|
||||
selectMappingListInfo({ dictSid: row.sid }).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.formobj.listDtos = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
Add() {
|
||||
this.formobj.listDtos.push({
|
||||
map_item: '',
|
||||
map_itemKey: '',
|
||||
map_itemValue: '',
|
||||
map_object: '',
|
||||
map_sourceKey: '',
|
||||
map_sourceValue: '',
|
||||
sid: ''
|
||||
})
|
||||
},
|
||||
changeSource(value, row) {
|
||||
let bb = null
|
||||
this.mappingsource_list.forEach((e) => {
|
||||
if (e.dictValue === value) {
|
||||
bb = {
|
||||
value: e.dictValue,
|
||||
key: e.dictKey
|
||||
}
|
||||
}
|
||||
})
|
||||
row.map_sourceKey = bb.key
|
||||
},
|
||||
dataDelete(index) {
|
||||
this.formobj.listDtos.splice(index, 1)
|
||||
},
|
||||
save() {
|
||||
if (this.formobj.listDtos.length === 0) {
|
||||
this.$message({ showClose: true, type: 'error', message: '映射列表不能为空' })
|
||||
return
|
||||
}
|
||||
saveMappingList(this.formobj).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message({ showClose: true, type: 'success', message: '保存成功' })
|
||||
this.handleReturn()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleReturn() {
|
||||
this.formobj = {
|
||||
userSid: '',
|
||||
dictSid: '',
|
||||
listDtos: []
|
||||
}
|
||||
this.$emit('doback')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.title {
|
||||
padding: 7px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
212
src/views/system/logManage/logManage.vue
Normal file
212
src/views/system/logManage/logManage.vue
Normal file
@@ -0,0 +1,212 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="tab-header">
|
||||
<el-form :inline="true" :model="form" class="demo-form-inline">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="日志类别">
|
||||
<el-input v-model="page.params.eventName" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item style="float: right;">
|
||||
<el-button type="primary" @click="getPageList(page)">查询</el-button>
|
||||
<el-button type="primary" @click="exportExcel" >导出日志</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-table :data="tableData" border style="width: 100%;">
|
||||
<el-table-column label="序号" type="index" align="center" width="70px">
|
||||
</el-table-column>
|
||||
<el-table-column prop="eventName" label="日志类别" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="eventContent" label="日志内容" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="userName" label="用户名" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="userIp" label="IP地址" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="timestamp" label="记录时间" align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { logPageList } from '@/api/system/log/index.js'
|
||||
import axios from 'axios'
|
||||
import { getStorage } from '@/utils/auth'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
radio: '1',
|
||||
dialogVisible: false,
|
||||
disabled: false,
|
||||
form: {},
|
||||
page: {
|
||||
total: 0, // 默认数据总数
|
||||
current: 1, // 默认开始页面
|
||||
size: 10, // 每页的数据条数
|
||||
params: {
|
||||
eventName: ''
|
||||
}
|
||||
},
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
methods: {
|
||||
pagination(val) { // 分页
|
||||
this.page.current = val.pageNum
|
||||
this.page.size = val.pageSize
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
onSearch() { //查询
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
resetSearch(){ // 重置
|
||||
this.page = this.pageBackup
|
||||
},
|
||||
getPageList(data){ // 获取列表
|
||||
logPageList(data).then((res)=>{
|
||||
this.tableData = res.data.records
|
||||
this.page.total = res.data.total
|
||||
})
|
||||
},
|
||||
exportExcel(){ // 导出文件
|
||||
axios({
|
||||
method: 'get',
|
||||
url: 'api/system/v1/systemlogs/exportLogExcel',
|
||||
params: this.page,
|
||||
responseType: 'blob',
|
||||
headers:{'token': getStorage()}
|
||||
}).then(response => {
|
||||
let blob = new Blob([response.data], {type:"application/vnd.ms-excel"});
|
||||
if (!!window.ActiveXObject || "ActiveXObject" in window) {
|
||||
window.navigator.msSaveOrOpenBlob(blob, '日志');
|
||||
} else {
|
||||
let link = document.createElement('a');
|
||||
link.href = window.URL.createObjectURL(blob);
|
||||
link.download = "日志";
|
||||
link.click();
|
||||
}
|
||||
}).catch((error) => {
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped="scoped" lang="scss">
|
||||
.zcxx {
|
||||
color: #000;
|
||||
width: 98%;
|
||||
margin: 0px auto 30px;
|
||||
background-color: #f7f9fc;
|
||||
border: 1px solid #e6e9f0;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
|
||||
p {
|
||||
font-size: 18px;
|
||||
float: left;
|
||||
margin-top: 0px;
|
||||
margin-left: 10px;
|
||||
font-weight: bold;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.el-button {
|
||||
float: right;
|
||||
margin-top: 13px;
|
||||
border: none;
|
||||
width: 80px;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
table {
|
||||
width: 98%;
|
||||
margin: 0 auto;
|
||||
|
||||
tr {
|
||||
height: 45px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
td:first-child {
|
||||
text-align: right;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
td:nth-child(2) {
|
||||
padding-left: 30px;
|
||||
width: 23%;
|
||||
}
|
||||
|
||||
td:nth-child(3) {
|
||||
text-align: right;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
td:nth-child(4) {
|
||||
padding-left: 30px;
|
||||
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #015bff;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.sfz {
|
||||
border: 1px solid #e6e9f0;
|
||||
width: 45%;
|
||||
|
||||
}
|
||||
|
||||
#bei {
|
||||
width: 21.4%;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 148px;
|
||||
height: 148px;
|
||||
line-height: 148px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 148px;
|
||||
height: 148px;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
572
src/views/system/menuManage/menuManage.vue
Normal file
572
src/views/system/menuManage/menuManage.vue
Normal file
@@ -0,0 +1,572 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="my-tabs" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="菜单列表" name="roleList">
|
||||
<div class="content">
|
||||
<!--<div class="tab-header">-->
|
||||
<!-- <el-form :inline="true" :model="form" class="demo-form-inline">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="18">
|
||||
<el-form-item label="菜单名称">
|
||||
<el-input v-model="page.params.name" placeholder="菜单名称" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="资源名称">
|
||||
<!–<el-select v-model="page.sourceSid" @change="$forceUpdate()" :disabled="isadd">
|
||||
<el-option
|
||||
v-for="(item, i) in sourceNameData"
|
||||
:key="i"
|
||||
:label="item.sourceName"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>–>
|
||||
<el-input v-model="page.params.sourceName" placeholder="资源名称" clearable/>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="getPageList">查询</el-button>
|
||||
</el-col>-->
|
||||
<!-- <el-col :span="6">
|
||||
<el-form-item style="float: right;">
|
||||
<el-button type="primary" @click="getSorting">保存排序</el-button>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
<!--</el-row>
|
||||
</el-form>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- table -->
|
||||
<div class="table-describe clearfix">
|
||||
<h4 style="color:#000;">菜单列表</h4>
|
||||
</div>
|
||||
<el-table ref="multipleTable" :data="tableData" border style="width: 100%;" row-key="sid"
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
||||
<el-table-column prop="name" label="菜单名称" width="220" />
|
||||
<el-table-column label="操作" width="260" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="add(scope.row)">
|
||||
添加子菜单
|
||||
</el-button>
|
||||
<el-button v-if="scope.row.isSource == '0'" type="primary" size="mini" @click="editRow(scope.row)">
|
||||
修改
|
||||
</el-button>
|
||||
<el-button v-if="scope.row.isSource == '0'" type="danger" size="mini"
|
||||
@click.native.prevent="deleteRow(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column prop="sourceName" label="资源名称" align="center"></el-table-column>-->
|
||||
<!-- <el-table-column prop="sortNo" sortable label="排序" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.sortNo" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column prop="pageUrl" label="链接地址" align="center" />
|
||||
<el-table-column prop="isEnable" label="可见性" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.isEnable" active-color="#13ce66" inactive-color="#ff4949" active-value="1"
|
||||
inactive-value="0" @change="enabledChange(scope.row.isEnable,scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- <pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> -->
|
||||
<!-- 编辑功能信息 -->
|
||||
<el-dialog :title="dialogTitle + '功能信息'" :visible.sync="editDialog" width="40%">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<!-- <tr>
|
||||
<td>上级菜单</td>
|
||||
<td>
|
||||
<el-input v-model="form.pname" :disabled="true" style="width:300px" />
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td>资源名称</td>
|
||||
<td>
|
||||
<el-input v-model="form.sourceName" :disabled="true" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>菜单名称</td>
|
||||
<td>
|
||||
<el-input v-model="form.name" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>菜单路由</td>
|
||||
<td>
|
||||
<el-input v-model="form.menuUrl" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>菜单图片路径</td>
|
||||
<td>
|
||||
<el-input v-model="form.iconUrl" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>前端页面名称</td>
|
||||
<td>
|
||||
<el-input v-model="form.pageName" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>前端页面路径</td>
|
||||
<td>
|
||||
<el-input v-model="form.pageUrl" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否可见</td>
|
||||
<td>
|
||||
<el-radio-group v-model="form.isShow">
|
||||
<el-radio :label="0">否</el-radio>
|
||||
<el-radio :label="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>排序号</td>
|
||||
<td>
|
||||
<el-input v-model="form.sortNo" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td>
|
||||
<el-input v-model="form.remarks" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px; text-align: center;">
|
||||
<el-button type="primary" @click="save()">保 存</el-button>
|
||||
<el-button @click="editDialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="新增菜单" name="addrole">
|
||||
<!-- 添加 -->
|
||||
<!--<el-dialog :title="dialogTitle + '菜单管理'" :visible.sync="editDialog" width="40%">-->
|
||||
<table class="e-table" cellspacing="0">
|
||||
<!-- <tr>
|
||||
<td>上级菜单</td>
|
||||
<td>
|
||||
<el-input v-model="form.pname" :disabled="true" style="width:300px" />
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td>资源名称</td>
|
||||
<td>
|
||||
<el-input v-model="form.sourceName" :disabled="true" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>菜单名称</td>
|
||||
<td>
|
||||
<el-input v-model="form.name" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>菜单路由</td>
|
||||
<td>
|
||||
<el-input v-model="form.menuUrl" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>菜单图片路径</td>
|
||||
<td>
|
||||
<el-input v-model="form.iconUrl" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>前端页面名称</td>
|
||||
<td>
|
||||
<el-input v-model="form.pageName" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>前端页面路径</td>
|
||||
<td>
|
||||
<el-input v-model="form.pageUrl" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否可见</td>
|
||||
<td>
|
||||
<el-radio-group v-model="form.isShow">
|
||||
<el-radio :label="0">否</el-radio>
|
||||
<el-radio :label="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>排序号</td>
|
||||
<td>
|
||||
<el-input v-model="form.sortNo" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td>
|
||||
<el-input v-model="form.remarks" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px; text-align: center;">
|
||||
<el-button type="primary" @click="save()">保存</el-button>
|
||||
</div>
|
||||
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
pageList,
|
||||
menusTreelist,
|
||||
saveMenusInfo,
|
||||
putMenusInfo,
|
||||
delMenus,
|
||||
IsEnable
|
||||
} from '@/api/system/menu/index.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeName: 'roleList',
|
||||
editDialog: false,
|
||||
dialogTitle: '',
|
||||
checked: '',
|
||||
form: {
|
||||
pname: '顶级菜单',
|
||||
iconUrl: '',
|
||||
isShow: 1,
|
||||
menuName: '',
|
||||
menuUrl: '',
|
||||
pageAliasName: '',
|
||||
pageName: '',
|
||||
pageUrl: '',
|
||||
pageUrlRedirect: '',
|
||||
psid: '',
|
||||
remarks: '',
|
||||
sortNo: 0,
|
||||
sourceSid: 'wms',
|
||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33'
|
||||
},
|
||||
formBackup: Object.assign({}, this.form),
|
||||
tableData: [],
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: '',
|
||||
psid: '',
|
||||
sourceName: 'wms',
|
||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33'
|
||||
}
|
||||
},
|
||||
rank: '1',
|
||||
sourceNameData: [], // 资源
|
||||
isadd: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPageList()
|
||||
// this.getsourceList()
|
||||
|
||||
// getsourceList().then(res => {
|
||||
// this.sourceNameData = res.data
|
||||
// })
|
||||
},
|
||||
methods: {
|
||||
pagination(val) { // 分页
|
||||
this.page.current = val.pageNum
|
||||
this.page.size = val.pageSize
|
||||
this.getPageList()
|
||||
},
|
||||
resetSearch() { // 重置
|
||||
this.page.params = this.pageBackup
|
||||
},
|
||||
getPageList() { // 获取列表
|
||||
pageList(this.page).then((res) => {
|
||||
console.log('这里是条件查询', this.page)
|
||||
const treedata = res.data
|
||||
console.log('菜单列表', res)
|
||||
this.tableData = treedata
|
||||
this.page.total = res.data.total
|
||||
})
|
||||
},
|
||||
// 资源名称
|
||||
getsourceList() {
|
||||
const params = {}
|
||||
sourceList(params).then(res => {
|
||||
this.sourceNameData = res.data
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
if (tab.name == 'addrole') {
|
||||
this.dialogTitle = '新增'
|
||||
this.roleForm = Object.assign({}, this.formBackup)
|
||||
} else {
|
||||
this.getPageList()
|
||||
}
|
||||
},
|
||||
add(row) {
|
||||
this.activeName = 'addrole'
|
||||
// if(row == 0){
|
||||
// this.isadd = false
|
||||
// }else{
|
||||
// this.isadd = true
|
||||
// }
|
||||
// this.dialogTitle = '新增'
|
||||
// this.editDialog = true
|
||||
this.form = Object.assign({}, this.formBackup)
|
||||
this.form.isShow = 1
|
||||
// this.form.psid = row.sid || 0
|
||||
this.form.pname = row.name || '顶级菜单'
|
||||
this.form.sourceName = row.sourceName
|
||||
this.form.sourceSid = row.sourceSid
|
||||
if (row.isSource == '1') {
|
||||
this.form.psid = 0
|
||||
} else {
|
||||
this.form.psid = row.sid
|
||||
}
|
||||
},
|
||||
editRow(row) {
|
||||
this.dialogTitle = '编辑'
|
||||
this.editDialog = true
|
||||
this.form = Object.assign({}, row)
|
||||
this.form.isShow = 1
|
||||
this.form.pname = row.psid == '0' ? '顶级菜单' : row.pname
|
||||
},
|
||||
save() {
|
||||
if (this.form.sid) {
|
||||
putMenusInfo(this.form).then(res => {
|
||||
this.editDialog = false
|
||||
this.getPageList(this.page)
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
saveMenusInfo(this.form).then(res => {
|
||||
this.activeName = 'roleList'
|
||||
this.getPageList()
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
deleteRow(row) {
|
||||
this.$confirm('确定要删除该菜单吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
delMenus({
|
||||
sid: row.sid
|
||||
}).then(res => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.getPageList(this.page)
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
// 是否可用 按钮
|
||||
enabledChange(value, row) {
|
||||
IsEnable({
|
||||
sid: row.sid,
|
||||
isEnable: value
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
})
|
||||
})
|
||||
},
|
||||
//保存排序
|
||||
getSorting() {
|
||||
|
||||
},
|
||||
retname(sid) {
|
||||
obj = this.sourceNameData.find((item) => {
|
||||
return item.sid == sid // 筛选出匹配数据
|
||||
})
|
||||
return obj.name
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-input__inner {
|
||||
line-height: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped="scoped" lang="scss">
|
||||
.el-pagination.is-background .btn-next,
|
||||
.el-pagination.is-background .btn-prev {
|
||||
padding: 0 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.el-icon-arrow-left:before,
|
||||
.el-icon-arrow-right:before {
|
||||
content: '下一页';
|
||||
color: #727272;
|
||||
}
|
||||
|
||||
.el-icon-arrow-left:before {
|
||||
content: '上一页';
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
padding-top: 10px;
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.shouye {
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
left: 100px;
|
||||
font-size: 16px;
|
||||
color: #0395d8;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.placename {
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
left: 210px;
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.right_cont {
|
||||
width: 100%;
|
||||
height: 645px;
|
||||
background-color: #fff;
|
||||
margin: 0;
|
||||
padding: 15px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.cont_head {
|
||||
height: 40px;
|
||||
width: 97%;
|
||||
margin-left: 1.5%;
|
||||
background-color: #f7f9fc;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cont_head p {
|
||||
float: left;
|
||||
color: #000;
|
||||
line-height: 40px;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.cont_head input {
|
||||
float: left;
|
||||
height: 24px;
|
||||
width: 147px;
|
||||
margin-top: 6px;
|
||||
border: 1px solid #e6e9f0;
|
||||
border-radius: 5px;
|
||||
-webkit-appearance: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.cont_head select {
|
||||
float: left;
|
||||
height: 28px;
|
||||
width: 147px;
|
||||
margin-top: 6px;
|
||||
border: 1px solid #e6e9f0;
|
||||
border-radius: 5px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
height: 28px;
|
||||
width: 85px;
|
||||
line-height: 0px;
|
||||
background-color: #018ad2;
|
||||
margin-top: 6px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
float: right;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.tishi {
|
||||
width: 80%;
|
||||
|
||||
margin: auto;
|
||||
|
||||
tr {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 1px solid #e6e9f0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td:first-child {
|
||||
background-color: #f7f9fc;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 80%;
|
||||
height: 30px;
|
||||
border: 1px solid #e6e9f0;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 80%;
|
||||
height: 100px;
|
||||
border: 1px solid #e6e9f0;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
select {
|
||||
width: 80%;
|
||||
height: 30px;
|
||||
border: 1px solid #e6e9f0;
|
||||
}
|
||||
}
|
||||
|
||||
.my-tabs {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
660
src/views/system/organizationManage/organizationManage.vue
Normal file
660
src/views/system/organizationManage/organizationManage.vue
Normal file
@@ -0,0 +1,660 @@
|
||||
<template>
|
||||
<div class="container" style="display: flex;">
|
||||
<div class="org-tree">
|
||||
<el-tree :data="treedata" node-key="sid" :props="props" :default-expanded-keys="['fd6435f2-0005-11ec-a033-48452053aa33']" @node-click="handleNodeClick">
|
||||
<span class="custom-tree-node" slot-scope="{ node, data }" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)" @click.stop.native>
|
||||
<span>{{ node.label || $store.getters.userInfo.Orgname }}</span>
|
||||
<span v-show="data.del" class="handle">
|
||||
<el-tooltip class="item" effect="dark" content="新增" placement="top-start">
|
||||
<el-button type="text" size="mini" @click.stop="() => append(data)" icon="el-icon-circle-plus-outline">
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<!-- <el-tooltip v-show="data.sid" class="item" effect="dark" content="修改" placement="top-start">-->
|
||||
<!-- <el-button type="text" size="mini" @click.stop="() => deit(data)" icon="el-icon-edit">-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-tooltip>-->
|
||||
<!-- <el-tooltip v-show="data.sid" class="item" effect="dark" content="删除" placement="top-start">-->
|
||||
<!-- <el-button type="text" size="mini" @click.stop="() => remove(data)" icon="el-icon-delete">-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-tooltip>-->
|
||||
</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
<el-dialog title="编辑节点" :visible.sync="dialogVisible" width="50%" class="edit">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>组织名称</td>
|
||||
<td>
|
||||
<el-input v-model="form.name" style="width:300px"></el-input>
|
||||
</td>
|
||||
<td>组织编码</td>
|
||||
<td>
|
||||
<el-input v-model="form.orgCode" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>主管人员</td>
|
||||
<td>
|
||||
<el-select v-model="form.zgStaffSid" style="width:300px" filterable clearable>
|
||||
<el-option v-for="item in staffdata" :key="item.sid" :label="item.name" :value="item.sid"/>
|
||||
</el-select>
|
||||
</td>
|
||||
<td>分管人员</td>
|
||||
<td>
|
||||
<el-select v-model="fgStaffSid" style="width:300px" filterable multiple>
|
||||
<el-option v-for="item in staffdata2" :key="item.sid" :label="item.name" :value="item.sid"/>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>组织简称</td>
|
||||
<td :colspan="3">
|
||||
<el-input v-model="form.orgAbbre" style="width: 30%"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>管理层级</td>
|
||||
<td>
|
||||
<el-select v-model="form.orgLevelValue" style="width:300px" placeholder="请选择" filterable @change="changeOrgLevel">
|
||||
<el-option v-for="item in orgLevel_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
<td>其他编码</td>
|
||||
<td>
|
||||
<el-input v-model="form.otherCode" style="width:300px" placeholder="与财务中客户编码相同"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>组织地址</td>
|
||||
<td>
|
||||
<el-input v-model="form.addrs" style="width:300px"></el-input>
|
||||
</td>
|
||||
<td>组织属性</td>
|
||||
<td>
|
||||
<el-select v-model="form.orgAttributeValue" placeholder="请选择" filterable @change="changeOrgAttribute">
|
||||
<el-option v-for="item in orgAttribute_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>组织联系人</td>
|
||||
<td>
|
||||
<el-input v-model="form.linkPerson" style="width:300px"></el-input>
|
||||
</td>
|
||||
|
||||
<td>联系电话</td>
|
||||
<td>
|
||||
<el-input v-model="form.linkPhone" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否独立法人</td>
|
||||
<td>
|
||||
<el-radio v-model="form.isDept" :label="0">是</el-radio>
|
||||
<el-radio v-model="form.isDept" :label="1">否</el-radio>
|
||||
</td>
|
||||
<td>排序号</td>
|
||||
<td>
|
||||
<el-input v-model="form.sort" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div slot="footer" class="text-center">
|
||||
<el-button type="primary" @click="nodeSave()">保 存</el-button>
|
||||
<el-button @click="dialogVisible = false">返 回</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div class="org-table" v-show="isshow == 'table'">
|
||||
<div class="tab-header">
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="组织名称">
|
||||
<el-input v-model="page.params.name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="onSearch()">查询</el-button>
|
||||
<el-button @click="resetSearch()">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- table -->
|
||||
<el-table :data="tableData" default-expand-all border style="width: 100%;">
|
||||
<el-table-column label="操作" align="center" width="160px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="editRow(scope.row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="danger" size="mini" @click.native.prevent="remove(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="组织名称" align="center"></el-table-column>
|
||||
<el-table-column prop="orgCode" label="组织编码" align="center"></el-table-column>
|
||||
<!-- <el-table-column prop="zgNames" label="主管" align="center"></el-table-column>-->
|
||||
<el-table-column prop="fgNames" label="分管" align="center"></el-table-column>
|
||||
<!--<el-table-column prop="contactMan" label="联系人" align="center" width="100px"></el-table-column>-->
|
||||
<el-table-column prop="linkPhone" label="联系人手机号" width="110" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="addrs" label="地址" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="sort" label="排序" align="center" width="50px">
|
||||
</el-table-column>
|
||||
<el-table-column prop="qrText" label="二维码" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click.native.prevent="lookRow(scope.row)" type="text" size="small">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/>
|
||||
</div>
|
||||
|
||||
<div class="org-table" v-show="isshow == 'ewm'">
|
||||
<div class="tab-header">
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="16">
|
||||
<h4 style="margin: 0;line-height: 32px;">组织二维码</h4>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item style="float: right;">
|
||||
<el-button type="primary" @click="Printewm">打 印</el-button>
|
||||
<el-button @click="isshow = 'table'">返 回</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- center -->
|
||||
<div class="ewm" style="display: flex;justify-content: center; align-items: center;" ref="print">
|
||||
<img style="width: 200px; height: 200px;" :src="ewmForm.qrFilePath" alt="">
|
||||
<ul style="list-style:none; line-height: 32px; font-size: 16px;">
|
||||
<li><label>组织名称: </label><span>{{ ewmForm.departmentName }}</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 新增、编辑页面 -->
|
||||
<div class="org-table" v-show="isshow == 'edit'">
|
||||
<div class="tab-header">
|
||||
<el-form ref="form" :inline="true" :model="form" label-width="80px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="16">
|
||||
<h4 style="margin: 0;line-height: 32px;"> {{ dialogTitle }}组织信息</h4>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item style="float: right;">
|
||||
<el-button type="primary" @click="save()">保 存</el-button>
|
||||
<el-button @click="isshow = 'table'">返 回</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- center -->
|
||||
<div class="ediut">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>组织名称</td>
|
||||
<td>
|
||||
<el-input v-model="form.name" style="width:300px"></el-input>
|
||||
</td>
|
||||
<td>组织编码</td>
|
||||
<td>
|
||||
<el-input v-model="form.orgCode" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>主管人员</td>
|
||||
<td>
|
||||
<el-select v-model="form.zgStaffSid" style="width:300px" filterable clearable>
|
||||
<el-option v-for="item in staffdata" :key="item.sid" :label="item.name" :value="item.sid"/>
|
||||
</el-select>
|
||||
</td>
|
||||
<td>分管人员</td>
|
||||
<td>
|
||||
<el-select v-model="fgStaffSid" style="width:300px" filterable multiple>
|
||||
<el-option v-for="item in staffdata2" :key="item.sid" :label="item.name" :value="item.sid"/>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>组织简称</td>
|
||||
<td :colspan="3">
|
||||
<el-input v-model="form.orgAbbre" style="width: 300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>管理层级</td>
|
||||
<td>
|
||||
<el-select v-model="form.orgLevelValue" style="width:300px" placeholder="请选择" filterable @change="changeOrgLevel">
|
||||
<el-option v-for="item in orgLevel_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
<td>其他编码</td>
|
||||
<td>
|
||||
<el-input v-model="form.otherCode" style="width:300px" placeholder="与财务中客户编码相同"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>组织地址</td>
|
||||
<td>
|
||||
<el-input v-model="form.addrs" style="width:300px"></el-input>
|
||||
</td>
|
||||
<td>组织属性</td>
|
||||
<td>
|
||||
<el-select v-model="form.orgAttributeValue" placeholder="请选择" filterable @change="changeOrgAttribute">
|
||||
<el-option v-for="item in orgAttribute_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>组织联系人</td>
|
||||
<td>
|
||||
<el-input v-model="form.linkPerson" style="width:300px"></el-input>
|
||||
</td>
|
||||
<td>联系电话</td>
|
||||
<td>
|
||||
<el-input v-model="form.linkPhone" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否独立法人</td>
|
||||
<td>
|
||||
<el-radio v-model="form.isDept" :label="0">是</el-radio>
|
||||
<el-radio v-model="form.isDept" :label="1">否</el-radio>
|
||||
</td>
|
||||
<td>排序号</td>
|
||||
<td>
|
||||
<el-input v-model="form.sort" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <Position v-if="mapDialog" :address.sync="form.addrs" :maker-position.sync="form.jwd"
|
||||
:dialog-visible.sync="mapDialog"/>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
addOrgTree,
|
||||
delOrgtree,
|
||||
getQrCode, getStaff,
|
||||
getStaffName,
|
||||
orgList,
|
||||
pageList,
|
||||
postOrgtree,
|
||||
putOrgtree,
|
||||
selectBySid
|
||||
} from '@/api/system/departments/departments.js'
|
||||
import { typeValues } from '@/api/system/roleAdminister/index'
|
||||
import Position from '@/components/amap/amap.vue'
|
||||
|
||||
export default {
|
||||
components: { Position },
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
mapDialog: false,
|
||||
dialogTitle: '',
|
||||
props: {
|
||||
label: 'name',
|
||||
children: 'children'
|
||||
},
|
||||
nodeForm: {
|
||||
sid: '',
|
||||
name: '',
|
||||
sortNo: ''
|
||||
},
|
||||
ewmForm: {
|
||||
qrFilePath: '',
|
||||
organizationName: '',
|
||||
departmentName: '',
|
||||
address: ''
|
||||
},
|
||||
orgAttribute_list: [],
|
||||
orgLevel_list: [],
|
||||
form: {
|
||||
sid: '',
|
||||
name: '',
|
||||
orgCode: '',
|
||||
/* jwd: '',*/
|
||||
addrs: '',
|
||||
zgStaffSid: '',
|
||||
zgStaffName: '',
|
||||
fgStaffSid: '',
|
||||
fgStaffName: '',
|
||||
linkPerson: '',
|
||||
linkPhone: '',
|
||||
sort: '',
|
||||
isDept: '',
|
||||
orgAbbre: '',
|
||||
orgAttributeValue: '',
|
||||
orgAttributeKey: '',
|
||||
orgLevelValue: '',
|
||||
orgLevelKey: '',
|
||||
otherCode: ''
|
||||
},
|
||||
fgStaffSid: [],
|
||||
formBackup: Object.assign({}, this.form),
|
||||
isshow: 'table',
|
||||
page: {
|
||||
total: 0, // 默认数据总数
|
||||
current: 1, // 默认开始页面
|
||||
size: 10, // 每页的数据条数
|
||||
params: {
|
||||
name: '',
|
||||
organizationSid: '',
|
||||
psid: ''
|
||||
}
|
||||
},
|
||||
tableData: [],
|
||||
treedata: [],
|
||||
staffdata: [],
|
||||
staffdata2: [],
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getOrgTree()
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
typeValues({ type: 'orgAttribute' }).then((res) => {
|
||||
if (res.success) {
|
||||
this.orgAttribute_list = res.data
|
||||
}
|
||||
})
|
||||
typeValues({ type: 'orgLevel' }).then((res) => {
|
||||
if (res.success) {
|
||||
this.orgLevel_list = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
changeOrgLevel(value) {
|
||||
let bb = null
|
||||
this.orgLevel_list.forEach((e) => {
|
||||
if (e.dictValue === value) {
|
||||
bb = {
|
||||
value: e.dictValue,
|
||||
key: e.dictKey
|
||||
}
|
||||
}
|
||||
})
|
||||
this.form.orgLevelValue = bb.value
|
||||
this.form.orgLevelKey = bb.key
|
||||
},
|
||||
changeOrgAttribute(value) {
|
||||
let bb = null
|
||||
this.orgAttribute_list.forEach((e) => {
|
||||
if (e.dictValue === value) {
|
||||
bb = {
|
||||
key: e.dictKey,
|
||||
value: e.dictValue
|
||||
}
|
||||
}
|
||||
})
|
||||
this.form.orgAttributeKey = bb.key
|
||||
},
|
||||
pagination(val) { // 分页
|
||||
this.page.current = val.pageNum
|
||||
this.page.size = val.pageSize
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
handleNodeClick(data) {
|
||||
this.isshow = 'table'
|
||||
this.page.params.organizationSid = this.$store.getters.userInfo.orgSid
|
||||
this.page.params.psid = data.sid || 0
|
||||
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
getPageList(data) { // 获取树形列表
|
||||
pageList(data).then(res => {
|
||||
console.log('返回子级:',res)
|
||||
this.tableData = res.data.records
|
||||
this.page.total = res.data.total
|
||||
})
|
||||
},
|
||||
getOrgTree() { // 获取树形列表
|
||||
orgList({}).then(res => {
|
||||
this.treedata = res.data
|
||||
})
|
||||
},
|
||||
save() {
|
||||
if (this.fgStaffSid.length > 0) {
|
||||
this.form.fgStaffSid = this.fgStaffSid.join()
|
||||
} else {
|
||||
this.form.fgStaffName = ''
|
||||
this.form.fgStaffSid = ''
|
||||
}
|
||||
this.form.organizationSid = this.$store.getters.userInfo.orgSid
|
||||
// this.form.dlxx = typeof(this.form.dlxx) == 'string' ? this.form.dlxx : this.form.dlxx.join()
|
||||
if (this.form.sid) {
|
||||
// console.log(this.form)
|
||||
putOrgtree(this.form).then(res => {
|
||||
if (res.success) {
|
||||
this.isshow = 'table'
|
||||
this.getOrgTree()
|
||||
this.handleNodeClick({ sid: this.form.psid })
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
addOrgTree(this.form).then(res => {
|
||||
if (res.success) {
|
||||
this.isshow = 'table'
|
||||
this.getOrgTree()
|
||||
this.handleNodeClick({ sid: this.form.psid })
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
append(data) {
|
||||
console.log(123456789, data)
|
||||
this.dialogTitle = '新增'
|
||||
this.isshow = 'edit'
|
||||
this.fgStaffSid = []
|
||||
this.form = Object.assign({}, this.formBackup)
|
||||
this.form.psid = data.sid || 0
|
||||
this.form.organizationSid = this.$store.getters.userInfo.orgSid
|
||||
this.form.address = data.orgAddress || data.address
|
||||
this.form.dlxx = data.gisInfo || data.dlxx
|
||||
this.getStaff(data.sid)
|
||||
this.getStaff2(data.sid)
|
||||
},
|
||||
editRow(row) {
|
||||
this.getStaff(row.sid)
|
||||
this.getStaff2(row.sid)
|
||||
this.dialogTitle = '编辑'
|
||||
this.isshow = 'edit'
|
||||
this.fgStaffSid = []
|
||||
selectBySid(row.sid).then((response) => {
|
||||
if (response.success) {
|
||||
this.form = response.data
|
||||
this.form.fgStaffName = response.data.fgNames
|
||||
this.form.fgStaffSid = response.data.fgStaffSid
|
||||
if (this.form.fgStaffSid) {
|
||||
this.fgStaffSid = response.data.fgStaffSid.split(',')
|
||||
}
|
||||
this.form.zgStaffName = response.data.zgNames
|
||||
this.form.zgStaffSid = response.data.zgStaffSid
|
||||
console.log('编辑回显的数据', this.form)
|
||||
}
|
||||
})
|
||||
},
|
||||
deit(data) { // 节点编辑保存
|
||||
this.getStaff(data.sid)
|
||||
this.getStaff2(data.sid)
|
||||
console.log(data, 8888)
|
||||
this.dialogVisible = true
|
||||
this.form.sid = data.sid
|
||||
// this.form.psid = null
|
||||
this.form.name = data.name
|
||||
this.form.orgCode = data.orgCode
|
||||
/* this.form.jwd = data.jwd*/
|
||||
this.form.addrs = data.addrs
|
||||
this.form.linkPerson = data.linkPerson
|
||||
this.form.linkPhone = data.linkPhone
|
||||
this.form.sort = data.sort
|
||||
this.form.zgStaffSid = data.zgSids
|
||||
this.form.fgStaffSid = data.fgSids.split(',')
|
||||
},
|
||||
nodeSave() { // 节点编辑保存
|
||||
console.log('这是保存nodeSave(0')
|
||||
this.form.fgStaffSid = this.form.fgStaffSid.join()
|
||||
postOrgtree(this.form).then(res => {
|
||||
this.getOrgTree()
|
||||
this.dialogVisible = false
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
},
|
||||
remove(data) {
|
||||
this.$confirm('确定要删除该组织吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delOrgtree({ sid: data.sid }).then(res => {
|
||||
this.getOrgTree()
|
||||
this.handleNodeClick({ sid: data.psid })
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
lookRow(row) { // 查看二维码
|
||||
this.isshow = 'ewm'
|
||||
getQrCode({ sid: row.sid }).then(res => {
|
||||
this.ewmForm = res.data
|
||||
})
|
||||
},
|
||||
Printewm() {
|
||||
this.$print(this.$refs.print) // 使用
|
||||
},
|
||||
mouseenter(data) {
|
||||
this.$set(data, 'del', true)
|
||||
},
|
||||
mouseleave(data) {
|
||||
this.$set(data, 'del', false)
|
||||
},
|
||||
onSearch() {
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
resetSearch() {
|
||||
this.page.params.name = ''
|
||||
this.getPageList(this.page)
|
||||
},
|
||||
// 主管人员
|
||||
getStaff(orgSid) {
|
||||
getStaff({ deptSid: orgSid }).then((res) => {
|
||||
if (res.success) {
|
||||
this.staffdata = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 分管人员
|
||||
getStaff2(orgSid) {
|
||||
getStaffName({ deptSid: orgSid }).then(res => {
|
||||
this.staffdata2 = res.data
|
||||
console.log('分管人员', this.staffdata2)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-icon-arrow-right:before {
|
||||
content: '\e6e0';
|
||||
color: #727272;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped="scoped" lang="scss">
|
||||
.org-tree {
|
||||
width: 240px;
|
||||
min-height: 100%;
|
||||
box-sizing: border-box;
|
||||
/*padding-right: 10px;*/
|
||||
border: 1px solid #edf1f7;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.org-table {
|
||||
flex: 1;
|
||||
// padding-left: 10px;
|
||||
margin: 0 10px;
|
||||
border: 1px solid #edf1f7;
|
||||
min-height: 100%;
|
||||
overflow-y: scroll;
|
||||
|
||||
.ewm {
|
||||
margin: 30px auto 0;
|
||||
width: 560px;
|
||||
}
|
||||
|
||||
.ediut {
|
||||
margin: 30px auto 0;
|
||||
/*width:750px;*/
|
||||
}
|
||||
}
|
||||
|
||||
.custom-tree-node {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.handle {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
|
||||
.el-button--text {
|
||||
font-size: 15px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.my-tabs {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.edit {
|
||||
.el-form-item__label {
|
||||
width: 100px !important;
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
.el-input {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
|
||||
.td_left {
|
||||
border-left: 0 solid #e6e9f0;
|
||||
}
|
||||
</style>
|
||||
505
src/views/system/postManage/postManage.vue
Normal file
505
src/views/system/postManage/postManage.vue
Normal file
@@ -0,0 +1,505 @@
|
||||
<template>
|
||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="岗位列表" name="roleList">
|
||||
|
||||
<div class="container">
|
||||
<div class="tab-header">
|
||||
<el-form ref="form" :inline="true" :model="search" label-width="80px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="岗位名称">
|
||||
<el-input v-model="search.name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="所属部门">
|
||||
<el-select v-model="search.orgSid" placeholder="请选择" clearable @clear="handleClear">
|
||||
<el-option hidden :key="search.orgSid" :label="orgName" :value="search.orgSid"></el-option>
|
||||
<el-tree v-loading="loading" :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
|
||||
:default-checked-keys="checkedId"
|
||||
:default-expand-all='true' :check-strictly='true' :props="defaultProps"
|
||||
@check-change="checkchange"
|
||||
>
|
||||
</el-tree>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-button @click="getList(1)">查询</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- table -->
|
||||
<el-table :data="roleTable" border style="width: 100%;">
|
||||
<el-table-column label="序号" width="80px" type="index" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="220px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="editRow(scope.row)" type="primary" size="mini"> 修改</el-button>
|
||||
<el-button @click="delRow(scope.row)" type="danger" size="mini"> 删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="岗位名称" align="center"></el-table-column>
|
||||
<el-table-column prop="parentName" label="上级岗位名称" align="center"></el-table-column>
|
||||
<el-table-column prop="postCode" label="岗位编码" align="center"></el-table-column>
|
||||
<el-table-column prop="postLevel" label="职级" align="center"></el-table-column>
|
||||
<!-- <el-table-column prop="orgName" label="所属部门" align="center"></el-table-column> -->
|
||||
</el-table>
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/>
|
||||
|
||||
<!-- 编辑岗位信息 -->
|
||||
<el-dialog :title="dialogTitle + '岗位信息'" :visible.sync="editDialog" width="40%">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>上级岗位</td>
|
||||
<td> <!-- @change="changeParentSid" -->
|
||||
<el-select v-model="roleForm.parentSid" filterable clearable placeholder="请选择"
|
||||
style="width:300px">
|
||||
<el-option v-for="item in parentSidList" :key="item.sid" :label="item.name"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>岗位名称</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.name" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>岗位职级</td>
|
||||
<td>
|
||||
<el-select v-model="roleForm.postLevel" @change="changeUPpostLevel" filterable placeholder="请选择" style="width:300px">
|
||||
<el-option v-for="item in postLevelList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>岗位编码</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.postCode" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<!--<tr>
|
||||
<td>备注</td>
|
||||
<td>
|
||||
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6}" v-model="roleForm.remarks"></el-input>
|
||||
</td>
|
||||
</tr>-->
|
||||
<!-- <tr>
|
||||
<td>选择部门(单选)</td>
|
||||
<td>
|
||||
<el-tree
|
||||
:data="treedata1"
|
||||
show-checkbox
|
||||
node-key="sid"
|
||||
ref="Tree1"
|
||||
:default-expand-all='true'
|
||||
:check-strictly='true'
|
||||
:default-checked-keys="checkedId1"
|
||||
:props="defaultProps"
|
||||
@check-change="checkchange1"
|
||||
>
|
||||
</el-tree>
|
||||
</td>
|
||||
</tr> -->
|
||||
</table>
|
||||
<div style="margin-top: 20px; text-align: center;">
|
||||
<el-button type="primary" @click="save()">保 存</el-button>
|
||||
<el-button @click="editDialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<!-- 新增岗位信息 -->
|
||||
<el-tab-pane label="新增岗位" name="addrole">
|
||||
<el-card class="box-card">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>上级岗位</td>
|
||||
<td> <!-- @change="changeParentSid" -->
|
||||
<el-select v-model="roleForm.parentSid" filterable clearable placeholder="请选择"
|
||||
style="width:300px">
|
||||
<el-option v-for="item in parentSidList" :key="item.sid" :label="item.name"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>岗位名称</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.name" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>岗位职级</td>
|
||||
<td>
|
||||
<el-select v-model="roleForm.postLevel" @change="changePostLevel" filterable placeholder="请选择"
|
||||
style="width:300px">
|
||||
<el-option v-for="item in postLevelList" :key="item.dictKey" :label="item.dictValue"
|
||||
:value="item.dictKey">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>岗位编码</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.postCode" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<!--<tr>
|
||||
<td>备注</td>
|
||||
<td> <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6}" v-model="roleForm.remarks"></el-input></td>
|
||||
</tr>-->
|
||||
<!-- <tr>
|
||||
<td>选择部门(单选)</td>
|
||||
<td>
|
||||
<el-tree
|
||||
:data="treedata2"
|
||||
show-checkbox
|
||||
node-key="sid"
|
||||
ref="Tree2"
|
||||
:default-expand-all='true'
|
||||
:check-strictly='true'
|
||||
:default-checked-keys="checkedId2"
|
||||
:props="defaultProps"
|
||||
@check-change="checkchange2"
|
||||
>
|
||||
</el-tree>
|
||||
</td>
|
||||
</tr> -->
|
||||
</table>
|
||||
<div style="margin-top: 20px; text-align: center;">
|
||||
<el-button type="primary" @click="save()">保 存</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {delOrgroles, orgList, pageList, pullDown, putOrgroles, savePost,selectList} from '@/api/system/postManage/index.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialogTitle: '',
|
||||
activeName: 'roleList',
|
||||
roleForm: {
|
||||
remarks: "",
|
||||
roleName: "",
|
||||
postCode: '',
|
||||
orgSid: '',
|
||||
postLevel: '',
|
||||
postLevelKey: '',
|
||||
parentSid:''
|
||||
},
|
||||
formBackup: {},
|
||||
search: {
|
||||
name: '',
|
||||
orgSid: ''
|
||||
},
|
||||
orgName: '',
|
||||
page: {
|
||||
total: 0, // 默认数据总数
|
||||
current: 1, // 默认开始页面
|
||||
size: 10, // 每页的数据条数
|
||||
},
|
||||
roleTable: [],
|
||||
editDialog: false,
|
||||
// 树形
|
||||
loading: false,
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
// orgdata:[], // 部门
|
||||
checkedId: [],
|
||||
checkedId1: [],
|
||||
checkedId2: [],
|
||||
treedata: [],
|
||||
treedata1: [],
|
||||
treedata2: [],
|
||||
postLevelList: [],
|
||||
parentSidList: [],
|
||||
// chace: [],
|
||||
// roleDialog: false,
|
||||
// Thisrow: {},
|
||||
// orgListAll:[]
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.formBackup = Object.assign({}, this.roleForm),
|
||||
this.getList()
|
||||
this.getOrgList()
|
||||
this.postLevel()
|
||||
this.getParent()
|
||||
},
|
||||
methods: {
|
||||
pagination(val) { // 分页函数
|
||||
this.page.current = val.pageNum
|
||||
this.page.size = val.pageSize
|
||||
this.getList()
|
||||
},
|
||||
// 分页列表
|
||||
getList(flag) {
|
||||
if (flag == '1') {
|
||||
this.page.current = 1
|
||||
}
|
||||
let params = this.page
|
||||
params.params = this.search
|
||||
pageList(params).then(res => {
|
||||
this.page.total = res.data.total
|
||||
this.roleTable = res.data.records
|
||||
})
|
||||
},
|
||||
postLevel(){
|
||||
pullDown({ psid: 0, type: 'postLevel' }).then((res)=>{
|
||||
if(res.code==='200'){
|
||||
this.postLevelList=res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getParent(){
|
||||
selectList().then((res)=>{
|
||||
if(res.code==='200'){
|
||||
this.parentSidList=res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
changePostLevel(value){
|
||||
let bb = null
|
||||
this.postLevelList.forEach((e) => {
|
||||
if (e.dictKey == value) {
|
||||
bb = {
|
||||
name: e.dictValue,
|
||||
value: e.dictKey
|
||||
}
|
||||
}
|
||||
})
|
||||
this.roleForm.postLevel=bb.name
|
||||
this.roleForm.postLevelKey=bb.value
|
||||
},
|
||||
changeUPpostLevel(value){
|
||||
let bb = null
|
||||
this.postLevelList.forEach((e) => {
|
||||
if (e.dictKey == value) {
|
||||
bb = {
|
||||
name: e.dictValue,
|
||||
value: e.dictKey
|
||||
}
|
||||
}
|
||||
})
|
||||
this.roleForm.postLevel=bb.name
|
||||
this.roleForm.postLevelKey=bb.value
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
if (tab.name == 'addrole') {
|
||||
this.dialogTitle = '新增'
|
||||
this.roleForm = Object.assign({}, this.formBackup)
|
||||
} else {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
editRow(row) {
|
||||
this.dialogTitle = '编辑'
|
||||
this.editDialog = true
|
||||
console.log(row)
|
||||
this.roleForm = Object.assign({}, row)
|
||||
this.checkedId1 = [this.roleForm.orgSid]
|
||||
},
|
||||
delRow(row) {
|
||||
this.$confirm('确定要删除该岗位吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let params = {
|
||||
sids: row.sid
|
||||
}
|
||||
delOrgroles(params).then(res => {
|
||||
this.getList()
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
})
|
||||
})
|
||||
},
|
||||
// 保存角色
|
||||
save() {
|
||||
if (this.roleForm.sid) {
|
||||
// let orgSid = this.$refs.Tree1.getCheckedKeys()
|
||||
// this.roleForm.orgSid = orgSid.toString()
|
||||
putOrgroles(this.roleForm).then(res => {
|
||||
if (res.code == '200') {
|
||||
this.getList()
|
||||
this.editDialog = false
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// let orgSid = this.$refs.Tree2.getCheckedKeys()
|
||||
// this.roleForm.orgSid = orgSid.toString()
|
||||
savePost(this.roleForm).then(res => {
|
||||
if (res.code == '200') {
|
||||
this.getList()
|
||||
this.activeName = "roleList"
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
let arr = []
|
||||
// this.$refs.Tree2.setCheckedKeys(arr);
|
||||
}
|
||||
})
|
||||
}
|
||||
this.reset()
|
||||
},
|
||||
reset() {
|
||||
this.roleForm = {
|
||||
remarks: "",
|
||||
roleName: "",
|
||||
orgSid: ''
|
||||
};
|
||||
this.search = {
|
||||
name: '',
|
||||
orgSid: ''
|
||||
}
|
||||
},
|
||||
|
||||
// 获取部门树形
|
||||
getOrgList(row) {
|
||||
this.roleDialog = true
|
||||
this.checkedId = []
|
||||
// this.roleForm.roleName = row.roleName
|
||||
this.Thisrow = row
|
||||
this.loading = true
|
||||
let params = {
|
||||
// roleSid: row.sid,
|
||||
// userType: '2'
|
||||
}
|
||||
|
||||
orgList(params).then(res => {
|
||||
this.treedata = res.data
|
||||
this.treedata1 = res.data
|
||||
this.treedata2 = res.data
|
||||
// this.getTreeParentNode(res.data, this.checkedId)
|
||||
// this.getTreeParentid(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
},
|
||||
// // 递归查询所有上级数据
|
||||
// getTreeParentNode(menus, ids) {
|
||||
// for (var i = 0; i < menus.length; i++) {
|
||||
// if (menus[i].children && menus[i].children.length != 0) {
|
||||
// this.getTreeParentNode(menus[i].children, ids)
|
||||
// } else if (menus[i].isCheck) {
|
||||
// ids.push(menus[i].sid)
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// // 所有一级菜单ID
|
||||
// getTreeParentid(menus) {
|
||||
// for (var i = 0; i < menus.length; i++) {
|
||||
// this.chace.push(menus[i].sid)
|
||||
// }
|
||||
// },
|
||||
// getCheckedKeys() {
|
||||
// let _this = this
|
||||
// let roleMenus = []
|
||||
// this.$refs.Tree.getCheckedKeys().forEach(val => {
|
||||
// roleMenus.push({
|
||||
// menuSid: val,
|
||||
// orgSid: _this.$store.getters.userInfo.orgSid,
|
||||
// roleSid: _this.Thisrow.sid
|
||||
// })
|
||||
// })
|
||||
// let parentTrue = this.$refs.Tree.getHalfCheckedKeys()
|
||||
// for (let i = 0; i < parentTrue.length; i++) {
|
||||
// for (let j = 0; j < this.chace.length; j++) {
|
||||
// if (parentTrue[i] == this.chace[j]) {
|
||||
// parentTrue.splice(i, 1);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// parentTrue.forEach(val => {
|
||||
// roleMenus.push({
|
||||
// menuSid: val,
|
||||
// orgSid: _this.$store.getters.userInfo.orgSid,
|
||||
// roleSid: _this.Thisrow.sid
|
||||
// })
|
||||
// })
|
||||
// saveorgrolemenus({
|
||||
// roleSid: _this.Thisrow.sid,
|
||||
// roleMenus: roleMenus
|
||||
// }).then(res => {
|
||||
// this.roleDialog = false
|
||||
// this.$message({
|
||||
// message: res.msg,
|
||||
// type: 'success'
|
||||
// })
|
||||
// })
|
||||
// },
|
||||
checkchange(data, checked, indeterminate) {
|
||||
if (checked) {
|
||||
|
||||
this.search.orgSid = data.sid
|
||||
this.orgName = data.name
|
||||
|
||||
let arr = []
|
||||
arr = [data.sid];
|
||||
this.$refs.Tree.setCheckedKeys(arr);
|
||||
return;
|
||||
}
|
||||
},
|
||||
checkchange1(data, checked, indeterminate) {
|
||||
if (checked) {
|
||||
this.roleForm.orgSid = data.sid
|
||||
// this.orgName = data.name
|
||||
let arr = []
|
||||
arr = [data.sid];
|
||||
this.$refs.Tree1.setCheckedKeys(arr);
|
||||
return;
|
||||
}
|
||||
},
|
||||
checkchange2(data, checked, indeterminate) {
|
||||
if (checked) {
|
||||
this.roleForm.orgSid = data.sid
|
||||
// this.orgName = data.name
|
||||
let arr = []
|
||||
arr = [data.sid];
|
||||
this.$refs.Tree2.setCheckedKeys(arr);
|
||||
return;
|
||||
}
|
||||
},
|
||||
handleClear() {
|
||||
// 将选择器的值置空
|
||||
this.orgName = ''
|
||||
this.search.orgSid = ''
|
||||
let arr = []
|
||||
this.$refs.Tree.setCheckedKeys(arr);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-select > .el-input {
|
||||
display: block;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
/deep/ .tab-header .el-select {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.my-tabs {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
977
src/views/system/roleAdminister/roleAdminister.vue
Normal file
977
src/views/system/roleAdminister/roleAdminister.vue
Normal file
@@ -0,0 +1,977 @@
|
||||
<template xmlns="">
|
||||
<div>
|
||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="角色列表" name="roleList">
|
||||
<div class="container">
|
||||
<div class="tab-header">
|
||||
<el-form ref="form" :inline="true" :model="search" label-width="80px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="角色名称">
|
||||
<el-input v-model="search.name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-button @click="getroleOrgList(1)">查询</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- table -->
|
||||
<el-table :data="roleTable" border style="width: 100%;">
|
||||
<el-table-column label="序号" width="80px" type="index" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button @click="sourceMenus(scope.row)" type="primary" size="mini">资源授权</el-button> -->
|
||||
<!-- <el-button @click="funMenus(scope.row)" type="primary" size="mini">功能授权</el-button>-->
|
||||
<!-- <el-button @click="roleMenus(scope.row)" type="primary" size="mini">菜单授权</el-button>-->
|
||||
<el-button @click="charactarMenus(scope.row)" type="primary" size="mini">角色授权</el-button>
|
||||
<!-- <el-button @click="mobileMenus(scope.row)" type="primary" size="mini">移动端授权</el-button> -->
|
||||
<el-button @click="editRow(scope.row)" type="primary" size="mini">修改</el-button>
|
||||
<el-button @click="delRow(scope.row)" type="danger" size="mini">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="角色名称" width="220px" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="code" label="角色编码" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="sort" label="角色排序" align="center">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="postName" label="角色岗位" width="220px" align="center">
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column prop="roleTypeValue" label="组织层级" width="200px" align="center">
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="remarks" label="备注" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="isEnableName" label="是否可用" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isEnable"
|
||||
active-value='1'
|
||||
inactive-value='0'
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
@change="enabledChange($event,scope.row)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/>
|
||||
|
||||
<!-- 编辑角色信息 -->
|
||||
<el-dialog :title="dialogTitle + '角色信息'" :visible.sync="editDialog" width="40%">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<!-- <tr>
|
||||
<td>岗位</td>
|
||||
<td>
|
||||
<el-select v-model="roleForm.postSid" filterable style="width:300px" @change="changePost">
|
||||
<el-option
|
||||
v-for="(item, i) in postSidData"
|
||||
:key="i"
|
||||
:label="item.name"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td>角色名称</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.name" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>编码</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.code" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td>组织层级</td>
|
||||
<td>
|
||||
<el-select v-model="roleForm.roleTypeValue" style="width:300px" @change="changeOrgName">
|
||||
<el-option
|
||||
v-for="(item, i) in roleTypeValue_list"
|
||||
:key="i"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td>排序</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.sort" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td>
|
||||
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6}" v-model="roleForm.remarks"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px; text-align: center;">
|
||||
<el-button type="primary" @click="save()">保 存</el-button>
|
||||
<el-button @click="editDialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 资源授权 -->
|
||||
<el-dialog title="资源授权" :visible.sync="sourceDialog" width="50%">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>角色名称</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.name" readonly></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>可操作资源列表</td>
|
||||
<td>
|
||||
<el-tree v-loading="loading" :data="treedata" ref="sourceTree" show-checkbox accordion node-key="sid"
|
||||
:default-expand-all='true'
|
||||
:default-checked-keys="checkedId" :props="sourcedefaultProps" @check-change="checkchange">
|
||||
</el-tree>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div slot="footer" class="text-center">
|
||||
<el-button type="primary" @click="sourceSave">保 存</el-button>
|
||||
<el-button @click="sourceDialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 功能授权 -->
|
||||
<!-- <el-dialog title="功能授权" :visible.sync="funDialog" width="50%">-->
|
||||
<!-- <table class="e-table" cellspacing="0">-->
|
||||
<!-- <tr>-->
|
||||
<!-- <td>角色名称</td>-->
|
||||
<!-- <td>-->
|
||||
<!-- <el-input v-model="roleForm.name" readonly></el-input>-->
|
||||
<!-- </td>-->
|
||||
<!-- </tr>-->
|
||||
<!-- <tr>-->
|
||||
<!-- <td>可操作功能列表</td>-->
|
||||
<!-- <td>-->
|
||||
<!-- <el-tree v-loading="loading" :data="treedata" ref="funTree" show-checkbox accordion node-key="sid"-->
|
||||
<!-- :default-expand-all='true'-->
|
||||
<!-- :default-checked-keys="checkedId" :props="defaultProps" @check-change="checkchange">-->
|
||||
<!-- </el-tree>-->
|
||||
<!-- </td>-->
|
||||
<!-- </tr>-->
|
||||
<!-- </table>-->
|
||||
<!-- <div slot="footer" class="text-center">-->
|
||||
<!-- <el-button type="primary" @click="funSave">保 存</el-button>-->
|
||||
<!-- <el-button @click="funDialog = false">关 闭</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-dialog>-->
|
||||
<!-- 菜单授权 -->
|
||||
<!-- <el-dialog title="菜单授权" :visible.sync="roleDialog" width="50%">-->
|
||||
<!-- <table class="e-table" cellspacing="0">-->
|
||||
<!-- <tr>-->
|
||||
<!-- <td>角色名称</td>-->
|
||||
<!-- <td>-->
|
||||
<!-- <el-input v-model="roleForm.name" readonly></el-input>-->
|
||||
<!-- </td>-->
|
||||
<!-- </tr>-->
|
||||
<!-- <tr>-->
|
||||
<!-- <td>可操作菜单列表</td>-->
|
||||
<!-- <td>-->
|
||||
<!-- <div style="height:230px;line-height:120px;overflow:auto;overflow-x:hidden;">-->
|
||||
<!-- <el-tree v-loading="loading" :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"-->
|
||||
<!-- :default-expand-all='true'-->
|
||||
<!-- :default-checked-keys="checkedId"-->
|
||||
<!-- :props="defaultProps"-->
|
||||
<!-- @check-change="checkchange">-->
|
||||
<!-- </el-tree>-->
|
||||
<!-- </div>-->
|
||||
<!-- </td>-->
|
||||
<!-- </tr>-->
|
||||
<!-- </table>-->
|
||||
<!-- <div slot="footer" class="text-center">-->
|
||||
<!-- <el-button type="primary" @click="getCheckedKeys">保 存</el-button>-->
|
||||
<!-- <el-button @click="roleDialog = false">关 闭</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-dialog>-->
|
||||
<el-dialog title="移动端授权" :visible.sync="mobileDialog" width="50%">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>角色名称</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.name" readonly></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>可操作菜单列表</td>
|
||||
<td>
|
||||
<div style="height:230px;overflow:auto;overflow-x:hidden;">
|
||||
<el-tree v-loading="loading" :data="treedata" ref="mobileTree" show-checkbox accordion node-key="sid"
|
||||
:default-expand-all="true"
|
||||
:default-checked-keys="checkedId"
|
||||
:props="defaultProps"
|
||||
@check-change="checkchange">
|
||||
</el-tree>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div slot="footer" class="text-center">
|
||||
<el-button type="primary" @click="getCheckedMobile">保 存</el-button>
|
||||
<el-button @click="mobileDialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="角色授权" :visible.sync="charactarDialog" width="70%">
|
||||
<el-tabs v-model="charactarName" type="card" style="margin-top: -30px;" @tab-click="handleCharactar">
|
||||
<el-tab-pane label="菜单权限" name="first">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>角色名称</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.name" readonly></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>可操作菜单列表</td>
|
||||
<td>
|
||||
<div style="height:230px;overflow:auto;overflow-x:hidden;">
|
||||
<el-tree v-loading="loading" :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
|
||||
:default-checked-keys="checkedId"
|
||||
:props="defaultProps"
|
||||
@check-change="checkchange">
|
||||
</el-tree>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 10px" class="text-center">
|
||||
<el-button type="primary" @click="getCheckedKeys">保 存</el-button>
|
||||
<el-button @click="charactarDialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="功能权限" name="second">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>角色名称</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.name" readonly></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>可操作功能列表</td>
|
||||
<td>
|
||||
<div style="height:230px;line-height:120px;overflow:auto;overflow-x:hidden;">
|
||||
<el-tree v-loading="loading" :data="treedata" ref="funTree" show-checkbox accordion node-key="sid"
|
||||
:default-checked-keys="checkedId" :props="defaultProps" @check-change="checkchange">
|
||||
</el-tree>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 10px" class="text-center">
|
||||
<el-button type="primary" @click="funSave">保 存</el-button>
|
||||
<el-button @click="charactarDialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="数据权限" name="third">
|
||||
<el-form :model="formobj" class="formadd">
|
||||
<el-row style="border-top: 1px solid #E0E3EB">
|
||||
<el-col :span="6" class="tleftb">
|
||||
<span>角色名称</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-form-item>
|
||||
<span>{{ formobj.name }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="tleftb">
|
||||
<span>菜单名称名称</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-form-item>
|
||||
<el-input v-model="formobj.title" clearable placeholder="" style="width: 30%"/>
|
||||
<el-button style="margin-left: 10px" type="primary" size="small" @click="handleSelect">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :key="tableKey" :data="formobj.tableData" :index="index" border style="width: 100%" max-height="300">
|
||||
<el-table-column type="index" label="序号" :index="index + 1" width="80" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="菜单名称" header-align="center" align="left">
|
||||
</el-table-column>
|
||||
<el-table-column label="权限" align="center" width="450">
|
||||
<template slot-scope="scope">
|
||||
<el-radio-group v-model="scope.row.dataRuleId">
|
||||
<el-radio label="1">集团</el-radio>
|
||||
<el-radio label="2">事业部</el-radio>
|
||||
<el-radio label="3">分公司</el-radio>
|
||||
<el-radio label="4">部门</el-radio>
|
||||
<el-radio label="5">个人</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div style="margin-top: 10px" class="text-center">
|
||||
<el-button type="primary" @click="handleSave">保 存</el-button>
|
||||
<el-button @click="charactarDialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<!-- 新增角色 -->
|
||||
<el-tab-pane label="新增角色" name="addrole">
|
||||
<el-card class="box-card">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<!-- <tr>
|
||||
<td>岗位</td>
|
||||
<td>
|
||||
<el-select v-model="roleForm.postSid" filterable style="width:300px" @change="changePost">
|
||||
<el-option v-for="item in postSidData" :key="item.sid" :label="item.name" :value="item.sid"></el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td>角色名称</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.name" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>编码</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.code" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td>组织层级</td>
|
||||
<td>
|
||||
<el-select v-model="roleForm.roleTypeValue" style="width:300px" @change="changeOrgName">
|
||||
<el-option v-for="item in roleTypeValue_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td>排序</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.sort" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td>
|
||||
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6}" v-model="roleForm.remarks"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px; text-align: center;">
|
||||
<el-button type="primary" @click="save()">保 存</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
delOrgroles,
|
||||
funMenuTree,
|
||||
postList,
|
||||
putOrgroles,
|
||||
roleMenuTree,
|
||||
roleOrgList,
|
||||
getRoleMenuList,
|
||||
saveRoleMenuList,
|
||||
savefunMenu,
|
||||
saveorgrolemenus,
|
||||
saveOrgroles,
|
||||
saveSource,
|
||||
setRoleEnable,
|
||||
sourceMenuTree,
|
||||
typeValues,
|
||||
selMenuByRole,
|
||||
updateDataByRoleMenu
|
||||
} from '@/api/system/roleAdminister/index.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialogTitle: '',
|
||||
activeName: 'roleList',
|
||||
roleForm: {
|
||||
name: '',
|
||||
code: '',
|
||||
sort: '',
|
||||
type: '2',
|
||||
postSid: '',
|
||||
remarks: '',
|
||||
roleType: '',
|
||||
roleTypeValue: '',
|
||||
orgSid: window.sessionStorage.getItem('orgSid')
|
||||
},
|
||||
formBackup: {},
|
||||
search: {
|
||||
name: ''
|
||||
},
|
||||
page: {
|
||||
total: 0, // 默认数据总数
|
||||
current: 1, // 默认开始页面
|
||||
size: 10 // 每页的数据条数
|
||||
},
|
||||
roleTable: [],
|
||||
postSidData: [],
|
||||
roleTypeValue_list: [], // 组织层级
|
||||
editDialog: false,
|
||||
// 树形
|
||||
loading: false,
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
checkedId: [], // 菜单授权 已选中
|
||||
treedata: [], // 菜单授权
|
||||
chace: [],
|
||||
roleDialog: false,
|
||||
Thisrow: {},
|
||||
// 资源授权
|
||||
sourceDialog: false,
|
||||
sourcetreedata: [],
|
||||
sourcedefaultProps: {
|
||||
children: 'children',
|
||||
label: 'sourceName'
|
||||
},
|
||||
// 功能授权
|
||||
funDialog: false,
|
||||
// 移动端授权
|
||||
mobileDialog: false,
|
||||
// 角色授权(包含功能权限、菜单权限、数据权限)
|
||||
charactarDialog: false,
|
||||
charactarName: '',
|
||||
tableKey: 0,
|
||||
index: 0,
|
||||
formobj: {
|
||||
name: '',
|
||||
title: '',
|
||||
tableData: []
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.formBackup = Object.assign({}, this.roleForm)
|
||||
this.getroleOrgList()
|
||||
this.getPostList()
|
||||
this.getType()
|
||||
},
|
||||
methods: {
|
||||
pagination(val) { // 分页函数
|
||||
this.page.current = val.pageNum
|
||||
this.page.size = val.pageSize
|
||||
this.getroleOrgList()
|
||||
},
|
||||
getPostList() {
|
||||
postList().then((res) => {
|
||||
if (res.success) {
|
||||
this.postSidData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getType() {
|
||||
typeValues({ type: 'roleType' }).then((res) => {
|
||||
if (res.success) {
|
||||
this.roleTypeValue_list = res.data
|
||||
console.log('下拉框请求组织层级', res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 分页列表
|
||||
getroleOrgList(flag) {
|
||||
if (flag == '1') {
|
||||
this.page.current = 1
|
||||
}
|
||||
let params = this.page
|
||||
params.params = this.search
|
||||
roleOrgList(params).then(res => {
|
||||
this.page.total = res.data.total
|
||||
this.roleTable = res.data.records
|
||||
for (let i = 0; i < this.roleTable.length; i++) {
|
||||
if (this.roleTable[i].isEnable == '1') {
|
||||
this.roleTable[i].isEnableName = '是'
|
||||
} else {
|
||||
this.roleTable[i].isEnableName = '否'
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
changeOrgName(value) {
|
||||
const choosetItem = this.roleTypeValue_list.filter((item) => item.dictValue === value)
|
||||
this.roleForm.roleType = choosetItem[0].dictKey
|
||||
console.log('组织层级', this.roleForm.roleType, this.roleForm.roleTypeValue)
|
||||
},
|
||||
changePost(value) {
|
||||
const choosetItem = this.postSidData.filter((item) => item.sid === value)
|
||||
this.roleForm.name = choosetItem[0].name
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
if (tab.name == 'addrole') {
|
||||
this.dialogTitle = '新增'
|
||||
this.roleForm = Object.assign({}, this.formBackup)
|
||||
} else {
|
||||
this.getroleOrgList()
|
||||
}
|
||||
},
|
||||
handleCharactar(tab) {
|
||||
if (tab.name === 'first') {
|
||||
this.roleMenus(this.Thisrow)
|
||||
} else if (tab.name === 'second') {
|
||||
this.funMenus(this.Thisrow)
|
||||
} else if (tab.name === 'third') {
|
||||
this.formobj.name = this.Thisrow.name
|
||||
selMenuByRole({ roleSid: this.Thisrow.sid, menuName: this.formobj.title }).then((res) => {
|
||||
if (res.success) {
|
||||
this.formobj.tableData = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSelect() {
|
||||
selMenuByRole({ roleSid: this.Thisrow.sid, menuName: this.formobj.title }).then((res) => {
|
||||
if (res.success) {
|
||||
this.formobj.tableData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSave() {
|
||||
updateDataByRoleMenu(this.formobj.tableData).then((res) => {
|
||||
if (res.success) {
|
||||
this.formobj = {
|
||||
name: '',
|
||||
title: '',
|
||||
tableData: []
|
||||
}
|
||||
this.$message({ showClose: true, type: 'success', message: '保存成功' })
|
||||
this.charactarDialog = false
|
||||
}
|
||||
})
|
||||
},
|
||||
editRow(row) {
|
||||
this.dialogTitle = '编辑'
|
||||
this.editDialog = true
|
||||
this.roleForm = Object.assign({}, row)
|
||||
},
|
||||
delRow(row) {
|
||||
this.$confirm('确定要删除该角色吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delOrgroles({ sid: row.sid }).then((res) => {
|
||||
if (res.success) {
|
||||
this.getroleOrgList()
|
||||
this.$message({ showClose: true, type: 'success', message: '删除成功!' })
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 保存角色
|
||||
save() {
|
||||
if (this.roleForm.sid) {
|
||||
putOrgroles(this.roleForm).then((res) => {
|
||||
if (res.success) {
|
||||
this.getroleOrgList()
|
||||
this.editDialog = false
|
||||
this.$message({ showClose: true, message: res.msg, type: 'success' })
|
||||
}
|
||||
})
|
||||
} else {
|
||||
saveOrgroles(this.roleForm).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message({ showClose: true, message: res.msg, type: 'success' })
|
||||
this.activeName = 'roleList'
|
||||
this.getroleOrgList()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 是否可用 按钮
|
||||
enabledChange(value, row) {
|
||||
setRoleEnable({
|
||||
sid: row.sid,
|
||||
isEnable: value
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message({ showClose: true, type: 'success', message: res.msg })
|
||||
}
|
||||
})
|
||||
},
|
||||
sourceMenus(row) {
|
||||
this.sourceDialog = true
|
||||
this.checkedId = []
|
||||
this.roleForm.name = row.name
|
||||
this.Thisrow = row
|
||||
this.loading = true
|
||||
let params = {
|
||||
roleSid: row.sid
|
||||
}
|
||||
sourceMenuTree(params).then(res => {
|
||||
let data1 = res.data
|
||||
for (let i = 0; i < data1.length; i++) {
|
||||
if (data1[i].checked == 0) {
|
||||
this.checkedId.push(data1[i].sid)
|
||||
}
|
||||
}
|
||||
this.treedata = res.data
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
funMenus(row) {
|
||||
this.funDialog = true
|
||||
this.checkedId = []
|
||||
this.roleForm.name = row.name
|
||||
this.Thisrow = row
|
||||
this.loading = true
|
||||
let params = {
|
||||
roleSid: row.sid
|
||||
}
|
||||
funMenuTree(params).then(res => {
|
||||
let data1 = res.data
|
||||
// 如果菜单有子级菜单,说明是父级菜单,父级菜单不可以直接赋值已选中状态
|
||||
for (let i = 0; i < data1.length; i++) {
|
||||
if (data1[i].children) {
|
||||
// data2各模块中的一级菜单
|
||||
let data2 = data1[i].children
|
||||
for (let j = 0; j < data2.length; j++) {
|
||||
// 如果一级菜单有子级菜单(二级菜单),就循环查看二级菜单有无子级菜单
|
||||
if (data2[j].children) {
|
||||
// data3各模块中的二级菜单
|
||||
const data3 = data2[j].children
|
||||
for (let k = 0; k < data3.length; k++) {
|
||||
// 如果二级菜单有子级菜单(三级菜单),就循环查看三级菜单有无子级菜单
|
||||
if (data3[k].children) {
|
||||
const data4 = data3[k].children
|
||||
for (let l = 0; l < data4.length; l++) {
|
||||
if (data4[l].checked == 0) {
|
||||
this.checkedId.push(data4[l].sid)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 如果二级菜单没有子级菜单(三级菜单),查看是否是选中状态
|
||||
if (data3[k].children.length == 0 && data3[k].checked == 0) {
|
||||
this.checkedId.push(data3[k].sid)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 如果一级菜单没有子级菜单(二级菜单),查看是否是选中状态
|
||||
if (data2[j].children.length == 0 && data2[j].checked == 0) {
|
||||
this.checkedId.push(data2[j].sid)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// for (let i = 0; i < data1.length; i++) {
|
||||
// if (data1[i].checked == 0) {
|
||||
// this.checkedId.push(data1[i].sid)
|
||||
// }
|
||||
// for (let j = 0; j < data1[i].children.length; j++) {
|
||||
// let data2 = data1[i].children
|
||||
// if (data2[j].checked == 0) {
|
||||
// this.checkedId.push(data2[j].sid)
|
||||
// }
|
||||
// for (let k = 0; k < data2[j].children.length; k++) {
|
||||
// let data3 = data2[j].children
|
||||
// if (data3[k].checked == 0) {
|
||||
// this.checkedId.push(data3[k].sid)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
this.treedata = res.data
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 获取授权菜单树形
|
||||
roleMenus(row) {
|
||||
this.roleDialog = true
|
||||
this.checkedId = []
|
||||
this.roleForm.name = row.name
|
||||
this.Thisrow = row
|
||||
this.loading = true
|
||||
let params = {
|
||||
roleSid: row.sid
|
||||
}
|
||||
roleMenuTree(params).then(res => {
|
||||
let data1 = res.data
|
||||
// 如果菜单有子级菜单,说明是父级菜单,父级菜单不可以直接赋值已选中状态
|
||||
for (let i = 0; i < data1.length; i++) {
|
||||
if (data1[i].children) {
|
||||
// data2各模块中的一级菜单
|
||||
let data2 = data1[i].children
|
||||
for (let j = 0; j < data2.length; j++) {
|
||||
// 如果一级菜单有子级菜单(二级菜单),就循环查看二级菜单有无子级菜单
|
||||
if (data2[j].children) {
|
||||
// data3各模块中的二级菜单
|
||||
const data3 = data2[j].children
|
||||
for (let k = 0; k < data3.length; k++) {
|
||||
// 如果二级菜单有子级菜单(三级菜单),就循环查看三级菜单有无子级菜单
|
||||
if (data3[k].children) {
|
||||
const data4 = data3[k].children
|
||||
for (let l = 0; l < data4.length; l++) {
|
||||
if (data4[l].checked == 0) {
|
||||
this.checkedId.push(data4[l].sid)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 如果二级菜单没有子级菜单(三级菜单),查看是否是选中状态
|
||||
if (data3[k].children.length == 0 && data3[k].checked == 0) {
|
||||
this.checkedId.push(data3[k].sid)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 如果一级菜单没有子级菜单(二级菜单),查看是否是选中状态
|
||||
if (data2[j].children.length == 0 && data2[j].checked == 0) {
|
||||
this.checkedId.push(data2[j].sid)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// for (let i = 0; i < data1.length; i++) {
|
||||
// if (data1[i].checked == 0) {
|
||||
// this.checkedId.push(data1[i].sid)
|
||||
// }
|
||||
// for (let j = 0; j < data1[i].children.length; j++) {
|
||||
// let data2 = data1[i].children
|
||||
// if (data2[j].checked == 0) {
|
||||
// this.checkedId.push(data2[j].sid)
|
||||
// }
|
||||
// for (let k = 0; k < data2[j].children.length; k++) {
|
||||
// let data3 = data2[j].children
|
||||
// if (data3[k].checked == 0) {
|
||||
// this.checkedId.push(data3[k].sid)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
console.log('112233', this.checkedId)
|
||||
this.treedata = res.data
|
||||
this.getTreeParentNode(res.data, this.checkedId)
|
||||
this.getTreeParentid(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
mobileMenus(row) {
|
||||
this.mobileDialog = true
|
||||
this.checkedId = []
|
||||
this.roleForm.name = row.name
|
||||
this.Thisrow = row
|
||||
this.loading = true
|
||||
getRoleMenuList(row.sid).then(res => {
|
||||
let data1 = res.data
|
||||
// 如果菜单有子级菜单,说明是父级菜单,父级菜单不可以直接赋值已选中状态
|
||||
for (let i = 0; i < data1.length; i++) {
|
||||
if (data1[i].children) {
|
||||
// data2各模块中的一级菜单
|
||||
let data2 = data1[i].children
|
||||
for (let j = 0; j < data2.length; j++) {
|
||||
// 如果一级菜单有子级菜单(二级菜单),就循环查看二级菜单有无子级菜单
|
||||
if (data2[j].children) {
|
||||
// data3各模块中的二级菜单
|
||||
const data3 = data2[j].children
|
||||
for (let k = 0; k < data3.length; k++) {
|
||||
// 如果二级菜单有子级菜单(三级菜单),就循环查看三级菜单有无子级菜单
|
||||
if (data3[k].children) {
|
||||
const data4 = data3[k].children
|
||||
for (let l = 0; l < data4.length; l++) {
|
||||
if (data4[l].checked == 0) {
|
||||
this.checkedId.push(data4[l].sid)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 如果二级菜单没有子级菜单(三级菜单),查看是否是选中状态
|
||||
if (data3[k].children.length == 0 && data3[k].checked == 0) {
|
||||
this.checkedId.push(data3[k].sid)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 如果一级菜单没有子级菜单(二级菜单),查看是否是选中状态
|
||||
if (data2[j].children.length == 0 && data2[j].checked == 0) {
|
||||
this.checkedId.push(data2[j].sid)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// for (let i = 0; i < data1.length; i++) {
|
||||
// if (data1[i].checked == 0) {
|
||||
// this.checkedId.push(data1[i].sid)
|
||||
// }
|
||||
// for (let j = 0; j < data1[i].children.length; j++) {
|
||||
// let data2 = data1[i].children
|
||||
// if (data2[j].checked == 0) {
|
||||
// this.checkedId.push(data2[j].sid)
|
||||
// }
|
||||
// for (let k = 0; k < data2[j].children.length; k++) {
|
||||
// let data3 = data2[j].children
|
||||
// if (data3[k].checked == 0) {
|
||||
// this.checkedId.push(data3[k].sid)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
console.log('112233', this.checkedId)
|
||||
this.treedata = res.data
|
||||
this.getTreeParentNode(res.data, this.checkedId)
|
||||
// this.getTreeParentid(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
charactarMenus(row) {
|
||||
this.charactarDialog = true
|
||||
this.charactarName = 'first'
|
||||
this.Thisrow = row
|
||||
this.roleMenus(row)
|
||||
},
|
||||
// 递归查询所有上级数据
|
||||
getTreeParentNode(menus, ids) {
|
||||
for (var i = 0; i < menus.length; i++) {
|
||||
if (menus[i].children && menus[i].children.length !== 0) {
|
||||
this.getTreeParentNode(menus[i].children, ids)
|
||||
} else if (menus[i].isCheck) {
|
||||
ids.push(menus[i].sid)
|
||||
}
|
||||
}
|
||||
},
|
||||
// 所有一级菜单ID
|
||||
getTreeParentid(menus) {
|
||||
for (var i = 0; i < menus.length; i++) {
|
||||
this.chace.push(menus[i].sid)
|
||||
}
|
||||
},
|
||||
// 设置半选状态
|
||||
setHalfCheckedNodes(sid) {
|
||||
const node = this.$refs['Tree'].getNode(sid)
|
||||
console.log('11111', sid)
|
||||
console.log('11111', node)
|
||||
if (node) { // 此处应判断当前节点的checked属性是否为true,是则不必半选
|
||||
node.indeterminate = true
|
||||
}
|
||||
},
|
||||
// 资源授权保存
|
||||
sourceSave() {
|
||||
let sourceMenus = this.$refs.sourceTree.getCheckedKeys()
|
||||
let params = {
|
||||
sorceSid: sourceMenus.toString(),
|
||||
roleSid: this.Thisrow.sid
|
||||
}
|
||||
saveSource(params).then(res => {
|
||||
this.sourceDialog = false
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 功能授权保存
|
||||
funSave() {
|
||||
let funMenus = []
|
||||
funMenus = this.$refs.funTree.getCheckedNodes(false, true)
|
||||
// funMenus = this.$refs.Tree.getCheckedKeys()
|
||||
console.log('已选节点、半选节点node', funMenus)
|
||||
const funMenus_sid = []
|
||||
for (var i = 0; i < funMenus.length; i++) {
|
||||
funMenus_sid.push(funMenus[i].sid)
|
||||
}
|
||||
console.log('已选节点、半选节点sid', funMenus_sid)
|
||||
// let funMenus = this.$refs.funTree.getCheckedKeys()
|
||||
// let params = {
|
||||
// functionSid: funMenus.toString(),
|
||||
// roleSid: this.Thisrow.sid
|
||||
// }
|
||||
let params = {
|
||||
functionSid: funMenus_sid.toString(),
|
||||
roleSid: this.Thisrow.sid
|
||||
}
|
||||
savefunMenu(params).then(res => {
|
||||
this.funDialog = false
|
||||
this.charactarDialog = false
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 菜单授权
|
||||
getCheckedKeys() {
|
||||
let roleMenus = []
|
||||
roleMenus = this.$refs.Tree.getCheckedNodes(false, true)
|
||||
// roleMenus = this.$refs.Tree.getCheckedKeys()
|
||||
console.log('已选节点、半选节点node', roleMenus)
|
||||
const roleMenus_sid = []
|
||||
for (var i = 0; i < roleMenus.length; i++) {
|
||||
roleMenus_sid.push(roleMenus[i].sid)
|
||||
}
|
||||
console.log('已选节点、半选节点sid', roleMenus_sid)
|
||||
// let parentTrue = this.$refs.Tree.getHalfCheckedKeys()
|
||||
// for (let i = 0; i < parentTrue.length; i++) {
|
||||
// for (let j = 0; j < this.chace.length; j++) {
|
||||
// if (parentTrue[i] == this.chace[j]) {
|
||||
// parentTrue.splice(i, 1);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
let params = {
|
||||
menuSid: roleMenus_sid.toString(),
|
||||
roleSid: this.Thisrow.sid,
|
||||
sourceSid:"d936f1ba-03c3-11ec-bf08-48452053aa33"
|
||||
}
|
||||
saveorgrolemenus(params).then(res => {
|
||||
this.roleDialog = false
|
||||
this.charactarDialog = false
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
},
|
||||
getCheckedMobile() {
|
||||
let roleMenus = []
|
||||
roleMenus = this.$refs.mobileTree.getCheckedNodes(false, true)
|
||||
// roleMenus = this.$refs.Tree.getCheckedKeys()
|
||||
console.log('已选节点、半选节点node', roleMenus)
|
||||
const roleMenus_sid = []
|
||||
for (var i = 0; i < roleMenus.length; i++) {
|
||||
roleMenus_sid.push(roleMenus[i].sid)
|
||||
}
|
||||
console.log('已选节点、半选节点sid', roleMenus_sid)
|
||||
// let parentTrue = this.$refs.Tree.getHalfCheckedKeys()
|
||||
// for (let i = 0; i < parentTrue.length; i++) {
|
||||
// for (let j = 0; j < this.chace.length; j++) {
|
||||
// if (parentTrue[i] == this.chace[j]) {
|
||||
// parentTrue.splice(i, 1);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
let params = {
|
||||
menuSid: roleMenus_sid.toString(),
|
||||
roleSid: this.Thisrow.sid
|
||||
}
|
||||
saveRoleMenuList(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.mobileDialog = false
|
||||
this.$message({ showClose: true, message: res.msg, type: 'success' })
|
||||
}
|
||||
})
|
||||
},
|
||||
checkchange() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.my-tabs {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
65
src/views/system/userManage/userManage.vue
Normal file
65
src/views/system/userManage/userManage.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="用户列表" name="roleList">
|
||||
<user-manage-list :dataObj='dataObj' @status='isShow' @item='listObj'></user-manage-list>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="新增用户" name="addrole">
|
||||
<user-manage-add @status='isShow' :dataObj='childObj'></user-manage-add>
|
||||
</el-tab-pane>-->
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import userManageList from './userManageList.vue'
|
||||
import userManageAdd from './userManageAdd.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
userManageList: userManageList,
|
||||
userManageAdd: userManageAdd,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'roleList',
|
||||
editDialog: false,
|
||||
dataObj: {
|
||||
isShow: ''
|
||||
},
|
||||
childObj: {}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
if (tab.name == 'addrole') {
|
||||
this.dialogTitle = '新增'
|
||||
// this.roleForm = Object.assign({}, this.formBackup)
|
||||
} else {
|
||||
// this.getroleOrgList()
|
||||
}
|
||||
},
|
||||
isShow(val) {
|
||||
if (!val) {
|
||||
this.activeName = 'roleList'
|
||||
this.dataObj.isShow = false
|
||||
this.dataObj.isShow = true
|
||||
} else {
|
||||
this.activeName = 'addrole'
|
||||
}
|
||||
},
|
||||
listObj(val) {
|
||||
this.childObj = val
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped="scoped">
|
||||
.my-tabs {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
264
src/views/system/userManage/userManageAdd.vue
Normal file
264
src/views/system/userManage/userManageAdd.vue
Normal file
@@ -0,0 +1,264 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="box-card">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>姓名</td>
|
||||
<td>
|
||||
<el-input v-model="form.name" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>用户类型</td>
|
||||
<td>
|
||||
<el-select v-model="form.userType" @change="$forceUpdate()" style="width:300px">
|
||||
<el-option v-for="(item, i) in userTypeData" :key="i" :label="item.name" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>部门</td>
|
||||
<td>
|
||||
<el-select v-model="form.deptSid" placeholder="请选择" style="width:300px">
|
||||
<el-option hidden :key="form.deptSid" :label="orgName" :value="form.deptSid"></el-option>
|
||||
<el-tree :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
|
||||
:default-checked-keys="checkedId" :default-expand-all='true' :check-strictly='true'
|
||||
:props="defaultProps" @check-change="checkchange">
|
||||
</el-tree>
|
||||
</el-select>
|
||||
<!--<el-select v-model="form.deptSid" @change="$forceUpdate()">
|
||||
<el-option
|
||||
v-for="(item, i) in treedata"
|
||||
:key="i"
|
||||
:label="item.name"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>岗位</td>
|
||||
<td>
|
||||
<el-select v-model="form.postSid" @change="$forceUpdate()" style="width:300px">
|
||||
<el-option v-for="(item, i) in postSidData" :key="i" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!--<el-input v-model="form.postSid"></el-input>-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>手机号码</td>
|
||||
<td>
|
||||
<el-input v-model="form.mobile" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>手机验证码</td>
|
||||
<td>
|
||||
<el-input v-model="form.verificationCode" placeholder="请输入验证码" style="width:300px">
|
||||
<el-button v-show="showCode" slot="append" @click.native="getIdentifying">获取验证码</el-button>
|
||||
<el-button v-show="!showCode" slot="append">{{phoneCodeCount}} s</el-button>
|
||||
</el-input>
|
||||
<!--<el-input v-model="form.verificationCode"></el-input>-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px; text-align: center;">
|
||||
<el-button type="primary" @click="save()">保 存</el-button>
|
||||
<!--<el-button type="warning" @click="cancel()">取 消</el-button>-->
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
userAdd,
|
||||
userUpdata,
|
||||
userSingle,
|
||||
orgList,
|
||||
postList,
|
||||
getCode
|
||||
} from '@/api/system/userManage/index.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sid: '',
|
||||
name: '',
|
||||
userType: '',
|
||||
deptSid: '',
|
||||
postSid: '',
|
||||
mobile: '',
|
||||
verificationCode: ''
|
||||
},
|
||||
form1: {
|
||||
sid: '',
|
||||
},
|
||||
userTypeData: [{
|
||||
value: '1',
|
||||
name: '员工'
|
||||
}, {
|
||||
value: '2',
|
||||
name: '主管'
|
||||
}, {
|
||||
value: '3',
|
||||
name: '经理'
|
||||
}],
|
||||
treedata: [],
|
||||
checkedId: [],
|
||||
orgName: '',
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
postSidData: [],
|
||||
showCode: true,
|
||||
phoneCodeCount: '',
|
||||
timer: null,
|
||||
};
|
||||
},
|
||||
props: ['dataObj'],
|
||||
watch: {
|
||||
dataObj: {
|
||||
handler(val) {
|
||||
this.form1.sid = val.sid
|
||||
this.getUserSingle()
|
||||
this.getOrgList()
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getOrgList()
|
||||
},
|
||||
methods: {
|
||||
getUserSingle() {
|
||||
userSingle(this.form1).then(res => {
|
||||
if (res.code == '200') {
|
||||
this.form.sid = res.data.sid
|
||||
this.form.name = res.data.name
|
||||
this.form.userType = res.data.userType
|
||||
this.form.deptSid = res.data.deptSid
|
||||
this.orgName = res.data.departmentName
|
||||
this.form.postSid = res.data.postSid
|
||||
this.form.mobile = res.data.mobile
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取部门树形
|
||||
getOrgList(row) {
|
||||
// this.roleDialog = true
|
||||
this.checkedId = []
|
||||
this.Thisrow = row
|
||||
this.loading = true
|
||||
let params = {}
|
||||
orgList(params).then(res => {
|
||||
this.treedata = res.data
|
||||
})
|
||||
|
||||
},
|
||||
checkchange(data, checked, indeterminate) {
|
||||
if (checked) {
|
||||
|
||||
this.form.deptSid = data.sid
|
||||
this.orgName = data.name
|
||||
let arr = []
|
||||
arr = [data.sid];
|
||||
this.$refs.Tree.setCheckedKeys(arr);
|
||||
this.form.postSid = ''
|
||||
this.getPost(data.sid)
|
||||
return;
|
||||
}
|
||||
},
|
||||
getPost(orgSid) {
|
||||
let params = {
|
||||
sid: orgSid
|
||||
}
|
||||
postList(params).then(res => {
|
||||
this.postSidData = res.data
|
||||
})
|
||||
},
|
||||
save() {
|
||||
if (this.form.sid) {
|
||||
userUpdata(this.form).then(res => {
|
||||
if (res.code == '200') {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
this.$emit('status', false)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
let orgSid = this.$refs.Tree.getCheckedKeys()
|
||||
this.form.deptSid = orgSid.toString()
|
||||
userAdd(this.form).then(res => {
|
||||
if (res.code == '200') {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
this.$emit('status', false)
|
||||
}
|
||||
})
|
||||
let arr = []
|
||||
this.$refs.Tree.setCheckedKeys(arr);
|
||||
}
|
||||
this.reset()
|
||||
},
|
||||
reset() {
|
||||
this.form = {
|
||||
sid: '',
|
||||
name: '',
|
||||
userType: '',
|
||||
deptSid: '',
|
||||
postSid: '',
|
||||
mobile: '',
|
||||
verificationCode: ''
|
||||
}
|
||||
},
|
||||
//获取验证码
|
||||
getIdentifying() {
|
||||
if (this.form.mobile == "") {
|
||||
this.$alert('请填写手机号码', '', {
|
||||
confirmButtonText: '确定'
|
||||
})
|
||||
return;
|
||||
}
|
||||
//验证码倒计时
|
||||
const TIME_COUNT = 60;
|
||||
if (!this.timer) {
|
||||
this.phoneCodeCount = TIME_COUNT;
|
||||
this.showCode = false;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.phoneCodeCount > 0 && this.phoneCodeCount <= TIME_COUNT) {
|
||||
this.phoneCodeCount--;
|
||||
} else {
|
||||
this.showCode = true;
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
let obj = {
|
||||
phone: this.form.mobile,
|
||||
}
|
||||
getCode(obj).then(res => {
|
||||
if (res.code == '200') {
|
||||
this.orginTranceNo = res.data.tranceNo;
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
this.$emit('status', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
504
src/views/system/userManage/userManageList.vue
Normal file
504
src/views/system/userManage/userManageList.vue
Normal file
@@ -0,0 +1,504 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="tab-header">
|
||||
<el-form ref="form" :inline="true" :model="page.params" label-width="80px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="用户名">
|
||||
<el-input v-model="page.params.userName" clearable></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="姓名">
|
||||
<el-input v-model="search.name" clearable></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="角色">
|
||||
<el-select v-model="page.params.roleSid" filterable clearable placeholder="请选择">
|
||||
<el-option v-for="item in roleListAll" :key="item.sid" :label="item.name" :value="item.sid"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="部门"> -->
|
||||
<!-- <el-input v-model="page.params.orgName" clearable></el-input> -->
|
||||
<!-- <el-select v-model="search.roleSid" clearable placeholder="请选择">-->
|
||||
<!-- <el-option v-for="(item,i) in roleListAll" :key="i" :label="item.name" :value="item.sid"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item> -->
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="getOrgUserList(1)">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- table -->
|
||||
<el-table :data="userTable" border style="width: 100%;">
|
||||
<el-table-column label="序号" width="80px" type="index" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="setRole(scope.row)" type="primary" size="mini">
|
||||
设置角色
|
||||
</el-button>
|
||||
<el-button @click="initPwd(scope.row)" type="danger" size="mini">
|
||||
初始化密码
|
||||
</el-button>
|
||||
<!-- <el-button @click="del(scope.row)" type="danger" size="mini">
|
||||
删除
|
||||
</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userName" label="用户名" align="center">
|
||||
<template slot-scope="scope">
|
||||
<!-- <span class="tablerow-click" @click="userinfoChange(scope.row)">{{ scope.row.userName }}</span> -->
|
||||
{{ scope.row.userName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userType" label="用户类型" align="center"></el-table-column>
|
||||
<el-table-column prop="name" label="姓名" align="center"></el-table-column>
|
||||
<!-- <el-table-column prop="departmentName" label="部门" align="center"></el-table-column> -->
|
||||
<!-- <el-table-column prop="postName" label="岗位" align="center"></el-table-column> -->
|
||||
<el-table-column prop="isEnable" label="是否可用" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.isEnable" active-value='1' inactive-value='0' active-color="#13ce66"
|
||||
inactive-color="#ff4949" @change="enabledChange($event,scope.row)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination" />
|
||||
<!-- 角色设置 -->
|
||||
<el-dialog title="设置角色" :visible.sync="roleDialog" width="30%">
|
||||
<el-form :model="roleForm" :rules="rules" ref="roleForm">
|
||||
<el-form-item label="角色名称" :label-width="formLabelWidth" prop="roleSid">
|
||||
<el-select v-model="roleForm.roleSid" placeholder="请选择" filterable multiple>
|
||||
<el-option v-for="(item,i) in roleList" :key="i" :label="item.name" :value="item.sid"></el-option>
|
||||
</el-select>
|
||||
<!--<el-button type="primary" size='mini' @click="toNav('RoleAdminister')" style="margin-left: 10px;" circle icon="el-icon-plus"></el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="saveRole('roleForm')">保 存</el-button>
|
||||
<el-button @click="roleDialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 部门设置 -->
|
||||
<el-dialog title="部门设置" :visible.sync="bm_Dialog" width="30%">
|
||||
<el-form :model="bm_Form" :rules="rules" ref="bm_Form">
|
||||
<el-form-item label="部门名称" :label-width="formLabelWidth" prop="departmentSid">
|
||||
<!-- <el-select v-model="bm_Form.departmentSid" placeholder="请选择">
|
||||
<el-option v-for="item in bm_List"
|
||||
:key="item.departmentSid"
|
||||
:label="item.departmentName"
|
||||
:value="item.departmentSid"
|
||||
></el-option>
|
||||
</el-select> -->
|
||||
<el-cascader v-model="bm_Form.departmentSid" :options="treedata" :props="props"></el-cascader>
|
||||
<el-button type="primary" size='mini' @click="toNav('deptManage')" style="margin-left: 10px;" circle
|
||||
icon="el-icon-plus"></el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="saveOrg('bm_Form')">保 存</el-button>
|
||||
<el-button @click="bm_Dialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 编辑信息 -->
|
||||
<el-dialog title="编辑用户信息" :visible.sync="editDialog" width="40%">
|
||||
<table class="e-table" cellspacing="0" style="margin-top: -30px;">
|
||||
<tr>
|
||||
<td>姓名</td>
|
||||
<td>
|
||||
<el-input v-model="form.name" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>用户类型</td>
|
||||
<td>
|
||||
<el-select v-model="form.userTypeKey" @change="$forceUpdate()" style="width:300px">
|
||||
<el-option v-for="(item, i) in userTypeData" :key="i" :label="item.name" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td>部门</td>
|
||||
<td>
|
||||
<el-select v-model="form.deptSid" placeholder="请选择" @change="$forceUpdate()" style="width:300px">
|
||||
<el-option hidden :key="form.deptSid" :label="orgName" :value="form.deptSid"></el-option>
|
||||
<el-tree :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
|
||||
:default-checked-keys="checkedId" :default-expand-all='true' :check-strictly='true'
|
||||
:props="defaultProps" @check-change="checkchange">
|
||||
</el-tree>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr> -->
|
||||
<!-- <tr>
|
||||
<td>岗位</td>
|
||||
<td>
|
||||
<el-select v-model="form.postSid" @change="$forceUpdate()" style="width:300px">
|
||||
<el-option v-for="(item, i) in postSidData" :key="i" :label="item.name" :value="item.sid"></el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td>手机号码</td>
|
||||
<td>
|
||||
<el-input v-model="form.userName" style="width:300px"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td>手机验证码</td>
|
||||
<td>
|
||||
<el-input v-model="form.verificationCode" placeholder="请输入验证码" style="width:300px">
|
||||
<el-button v-show="showCode" slot="append" @click.native="getIdentifying">获取验证码</el-button>
|
||||
<el-button v-show="!showCode" slot="append">{{ phoneCodeCount }} s</el-button>
|
||||
</el-input>
|
||||
</td>
|
||||
</tr> -->
|
||||
</table>
|
||||
<div style="margin-top: 20px; text-align: center;">
|
||||
<el-button type="primary" @click="save()">保 存</el-button>
|
||||
<el-button @click="editDialog = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
userList,
|
||||
delUser,
|
||||
initPwd,
|
||||
setRole,
|
||||
orgList,
|
||||
postList,
|
||||
saveOrgRole,
|
||||
roleList,
|
||||
setRoleEnable,
|
||||
userUpdata
|
||||
} from '@/api/system/userManage/index.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
editDialog: false,
|
||||
form: {},
|
||||
userTypeData: [{
|
||||
value: '1',
|
||||
name: '员工'
|
||||
}, {
|
||||
value: '2',
|
||||
name: '主管'
|
||||
}, {
|
||||
value: '3',
|
||||
name: '经理'
|
||||
}],
|
||||
checkedId: [],
|
||||
orgName: '',
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
showCode: true,
|
||||
postSidData: [],
|
||||
phoneCodeCount: '',
|
||||
roleListAll: [],
|
||||
props: {
|
||||
value: 'sid',
|
||||
label: 'name',
|
||||
children: 'orgDepartmentVoList'
|
||||
},
|
||||
treedata: null,
|
||||
page: {
|
||||
total: 0, // 默认数据总数
|
||||
current: 1, // 默认开始页面
|
||||
size: 10, // 每页的数据条数
|
||||
params: {
|
||||
name: '',
|
||||
userName: '',
|
||||
roleSid: '',
|
||||
orgSid: window.sessionStorage.getItem('orgSid'),
|
||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33'
|
||||
|
||||
},
|
||||
},
|
||||
userTable: [],
|
||||
// 设置角色
|
||||
formLabelWidth: '100',
|
||||
roleDialog: false,
|
||||
roleList: [],
|
||||
roleForm: {
|
||||
roleSid: '',
|
||||
userSid: ''
|
||||
},
|
||||
// 部门
|
||||
bm_Dialog: false,
|
||||
postSid: '',
|
||||
bm_Form: {
|
||||
departmentSid: ''
|
||||
},
|
||||
bm_List: [],
|
||||
rules: {
|
||||
roleSid: [{
|
||||
required: true,
|
||||
message: '请选择角色名称',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
departmentSid: [{
|
||||
required: true,
|
||||
message: '请选择部门名称',
|
||||
trigger: 'blur'
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
props: ['dataObj'],
|
||||
watch: {
|
||||
dataObj: {
|
||||
handler(val) {
|
||||
this.getOrgUserList()
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getOrgUserList()
|
||||
this.getRoleList()
|
||||
this.getOrgTree()
|
||||
this.getOrgList()
|
||||
},
|
||||
methods: {
|
||||
// 列表 + 初始化
|
||||
getOrgUserList() {
|
||||
userList(this.page).then(res => {
|
||||
this.page.total = res.data.total
|
||||
this.userTable = res.data.records
|
||||
})
|
||||
},
|
||||
// 点击重置
|
||||
handleReset() {
|
||||
this.page = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: '',
|
||||
userName: '',
|
||||
roleSid: '',
|
||||
orgSid: window.sessionStorage.getItem('orgSid'),
|
||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33'
|
||||
|
||||
},
|
||||
}
|
||||
this.getOrgUserList()
|
||||
},
|
||||
getRoleList() {
|
||||
var param = {}
|
||||
roleList(param).then(res => {
|
||||
if (res.code === '200') {
|
||||
this.roleListAll = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
pagination(val) {
|
||||
this.page.current = val.pageNum
|
||||
this.page.size = val.pageSize
|
||||
this.getOrgUserList()
|
||||
},
|
||||
getOrgTree() { // 获取部门树形列表
|
||||
function treeArr(data) {
|
||||
if (data.length > 0) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (data[i].orgDepartmentVoList.length > 0) {
|
||||
treeArr(data[i].orgDepartmentVoList)
|
||||
} else {
|
||||
delete data[i].orgDepartmentVoList
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// getOrgTree({organizationSid: this.$store.getters.userInfo.orgSid}).then(res => {
|
||||
// let tree = res.data[0].orgDepartmentVoList
|
||||
// treeArr(tree)
|
||||
// this.treedata = tree
|
||||
// })
|
||||
},
|
||||
// 设置角色 设置 用户ID
|
||||
setRole(row) {
|
||||
this.roleForm.roleSid = []
|
||||
this.roleDialog = true
|
||||
this.roleForm.sid = row.sid
|
||||
this.roleForm.userSid = row.sid
|
||||
setRole(this.roleForm).then(res => {
|
||||
this.roleList = res.data
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
if (res.data[i].checked === '0') {
|
||||
this.roleForm.roleSid.push(res.data[i].sid)
|
||||
}
|
||||
}
|
||||
// this.roleForm.roleSid = res.data.filter(item=> item.checked =='0')
|
||||
})
|
||||
},
|
||||
// 设置角色 提交
|
||||
saveRole(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.roleForm.roleSid = this.roleForm.roleSid.toString()
|
||||
saveOrgRole(this.roleForm).then(res => {
|
||||
if (res.code === '200') {
|
||||
this.roleDialog = false
|
||||
this.getOrgUserList()
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 设置部门 提交
|
||||
saveOrg(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
let params = { // 请求的参数
|
||||
departmentSid: this.bm_Form.departmentSid[this.bm_Form.departmentSid.length - 1],
|
||||
staffSid: this.bm_Form.staffSid
|
||||
}
|
||||
saveDepartment(params).then(res => {
|
||||
if (res.code === '200') {
|
||||
this.getOrgUserList()
|
||||
this.bm_Dialog = false
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置部门 提交
|
||||
save(formName) {
|
||||
this.form.userType = this.form.userTypeKey;
|
||||
userUpdata(this.form).then(res => {
|
||||
if (res.code === '200') {
|
||||
this.getOrgUserList()
|
||||
this.bm_Dialog = false
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
this.editDialog = false
|
||||
}
|
||||
this.reset()
|
||||
})
|
||||
},
|
||||
initPwd(row) {
|
||||
this.$confirm('此操作将初始化该用户密码, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
initPwd({
|
||||
sid: row.sid
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
// 修改用户信息
|
||||
userinfoChange(row) {
|
||||
var postSid = row.postSid
|
||||
this.editDialog = true
|
||||
this.form = Object.assign({}, row)
|
||||
this.postSid = postSid
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.Tree.setChecked(this.form.departmentSid, true, true)
|
||||
// })
|
||||
// this.$emit('status',true)
|
||||
// this.$emit('item',row)
|
||||
},
|
||||
// 删除
|
||||
del(row) {
|
||||
this.$confirm('此操作将删除该用户, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delUser({
|
||||
sid: row.sid
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
});
|
||||
this.getOrgUserList()
|
||||
})
|
||||
})
|
||||
},
|
||||
toNav(src) {
|
||||
this.$router.push('/' + src)
|
||||
},
|
||||
// 获取部门树形
|
||||
getOrgList(row) {
|
||||
// this.roleDialog = true
|
||||
this.checkedId = []
|
||||
this.Thisrow = row
|
||||
this.loading = true
|
||||
let params = {}
|
||||
orgList(params).then(res => {
|
||||
this.treedata = res.data
|
||||
})
|
||||
|
||||
},
|
||||
checkchange(data, checked, indeterminate) {
|
||||
if (checked) {
|
||||
this.form.deptSid = data.sid
|
||||
this.orgName = data.name
|
||||
let arr = []
|
||||
arr = [data.sid]
|
||||
this.$refs.Tree.setCheckedKeys(arr)
|
||||
this.form.postSid = ''
|
||||
this.getPost(data.sid)
|
||||
return
|
||||
}
|
||||
},
|
||||
getPost(orgSid) {
|
||||
let params = {
|
||||
sid: orgSid
|
||||
}
|
||||
postList(params).then(res => {
|
||||
this.postSidData = res.data
|
||||
})
|
||||
this.form.postSid = this.postSid
|
||||
},
|
||||
reset() {
|
||||
this.form = {}
|
||||
},
|
||||
enabledChange(value, row) {
|
||||
setRoleEnable({
|
||||
sid: row.sid,
|
||||
isEnable: value
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped="scoped">
|
||||
.el-select>.el-input {
|
||||
display: block;
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,333 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="上架单管理" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="单据编号">
|
||||
<el-input v-model="queryParams.params.billNo" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期">
|
||||
<el-date-picker v-model="queryParams.params.createTimeStart" type="date" placeholder="选择日期"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>至
|
||||
<el-date-picker v-model="queryParams.params.createTimeEnd" type="date" placeholder="选择日期"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源单号">
|
||||
<el-input v-model="queryParams.params.sourceBillNo" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-select v-model="queryParams.params.billState" placeholder="请选择">
|
||||
<el-option v-for="(item,i) in billStateList" :key="i" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">上架单列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"
|
||||
@selection-change="selectionLineChangeHandle">
|
||||
<el-table-column fixed width="50" type="selection" align="center" />
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column fixed label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="billNo" label="单据编号" align="center" />
|
||||
<el-table-column prop="createTime" label="单据日期" align="center" />
|
||||
<el-table-column prop="createByName" label="制单人" align="center" />
|
||||
<el-table-column prop="sourceBillNo" label="来源单号" align="center" />
|
||||
<el-table-column prop="billState" label="单据状态" align="center" />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End 查询和其列表部分 -->
|
||||
<!-- 新增修改部分组件 -->
|
||||
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
|
||||
<divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/upShelf/upShelf.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './upShelfAdd.vue'
|
||||
import divInfo from './upShelfInfo.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd,
|
||||
divInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formobj: {
|
||||
sid: "",
|
||||
reviewStatus: "",
|
||||
remarks: ''
|
||||
},
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'danger',
|
||||
size: 'small',
|
||||
icon: 'del',
|
||||
btnKey: 'doDel',
|
||||
btnLabel: '删除'
|
||||
},
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toPrintLabel',
|
||||
btnLabel: '打印标签'
|
||||
},
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '上架'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: [],
|
||||
selectionList: [],
|
||||
billStateList: [{
|
||||
name: "新建",
|
||||
sid: "0"
|
||||
},
|
||||
{
|
||||
name: "完成",
|
||||
sid: "1"
|
||||
}
|
||||
],
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
toPrintLabel() {
|
||||
if (this.selectionList.length != 1) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: "请选择一条数据。",
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
},
|
||||
selectionLineChangeHandle(val) {
|
||||
console.log("val", val);
|
||||
|
||||
this.selectionList = val
|
||||
const aa = []
|
||||
val.forEach(element => {
|
||||
aa.push(element.sid)
|
||||
})
|
||||
this.sids = aa
|
||||
|
||||
|
||||
},
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toPrintLabel':
|
||||
this.toPrintLabel()
|
||||
break
|
||||
case 'doDel':
|
||||
this.doDel()
|
||||
break
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
doDel() {
|
||||
if (this.sids.length > 0) {
|
||||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteBySids(this.sids).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
} else {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '请至少选择一条记录进行删除操作'
|
||||
})
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd(row) {
|
||||
|
||||
if (this.selectionList.length != 1) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: "请选择一条数据。",
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (this.selectionList[0].billState == '完成') {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: "此记录已完成,不可操作。",
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showEdit(this.selectionList[0])
|
||||
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 4
|
||||
this.$refs['divinfo'].showEdit(row)
|
||||
},
|
||||
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -1,412 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>{{title}}上架单</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-form ref="form_obj" :model="formobj" label-position="top" label-width="190px" class="formadd">
|
||||
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
|
||||
<div>基础信息</div>
|
||||
</div>
|
||||
<el-row class="first_row">
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据编号</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.billNo}}</span>
|
||||
<!-- <el-input v-model="formobj.name" placeholder="" class="addinputw" style="width:100%" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">制单人姓名</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<!-- <span slot="label">{{formobj.createByName}}</span> -->
|
||||
<el-input v-model="formobj.createByName" placeholder="" class="addinputw" style="width:100%" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">外部单号</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.sourceBillNo}}</span>
|
||||
<!-- <el-form-item class="trightb_item">
|
||||
<el-select v-model="GiftBagGood.goodsSkuSid" filterable clearable placeholder="请选择" style="width:100%"
|
||||
@change="orderTypeSelect">
|
||||
<el-option v-for="item in orderTypeList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据日期</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<!-- <span slot="label">{{formobj.createTime}}</span> -->
|
||||
<el-date-picker v-model="formobj.createTime" type="date" style="width:100%" value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">单据状态</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.billState}}</span>
|
||||
<!-- <el-input v-model="formobj.remarks" placeholder="" class="addinputw"
|
||||
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="4" clearable /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">备注</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-form-item class="trightb_item">
|
||||
<!-- <span slot="label">{{formobj.supplierName}}</span> -->
|
||||
<el-input v-model="formobj.remarks" placeholder="" class="addinputw"
|
||||
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="1" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<div class="title"
|
||||
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;">
|
||||
<div>商品列表</div>
|
||||
</div>
|
||||
<el-table v-loading="listLoading" :data="formobj.list" border style="width: 100%;"
|
||||
:row-style="{height: '40px'}">
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column fixed label="操作" wid align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="doGoodsBatch(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" />
|
||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" />
|
||||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" />
|
||||
<el-table-column label="单位" prop="unit" align="center" width="120" />
|
||||
<el-table-column label="仓库" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.warehouseName" placeholder="请选择" clearable
|
||||
@change="selectWarehouseName(scope.row,$event)">
|
||||
<el-option v-for="(item,i) in warehouseList" :key="i" :label="item.warehouseName" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库位" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.warehouseRackName" :disabled="scope.row.warehouseName==''" clearable
|
||||
@focus="getWarehouseAreaList(scope.row.warehouseSid)" placeholder="请选择"
|
||||
@change="selectWarehouseAreaCode">
|
||||
<el-option v-for="(item,i) in warehouseRackList" :key="i" :label="item.areaCode" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次号" prop="batchNumber" align="center" width="300" />
|
||||
<el-table-column label="上架数量" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input ref="focusAssumptionInput" v-model="scope.row.actualCount" clearable placeholder=""
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="载具编号" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-input ref="focusAssumptionInput" v-model="scope.row.packageNo" clearable placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/upShelf/upShelf.js'
|
||||
import req2 from '@/api/warehouse/allocation/allocation.js'
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
title: "【新增】",
|
||||
listLoading: false,
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
"sid": "",
|
||||
"billNo": "",
|
||||
"createBySid": "",
|
||||
"createByName": "",
|
||||
"createTime": "",
|
||||
"sourceBillNo": "",
|
||||
"sourceBillSid": "",
|
||||
"billState": "新建",
|
||||
"list": [
|
||||
|
||||
],
|
||||
"remarks": ""
|
||||
},
|
||||
hideUploadBtn: false,
|
||||
supplierList: [],
|
||||
warehouseList: [],
|
||||
warehouseRackList: [],
|
||||
// commodity商品
|
||||
commodityKey: 1,
|
||||
commodityLoading: false,
|
||||
commodityQuery: {
|
||||
current: 1,
|
||||
size: 2,
|
||||
total: 0,
|
||||
params: {
|
||||
name: '',
|
||||
inOrg: "",
|
||||
outOrg: ""
|
||||
}
|
||||
},
|
||||
commodityData: [],
|
||||
isUpdata: false
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
|
||||
methods: {
|
||||
|
||||
indexMethod(index) {
|
||||
return index + 1
|
||||
},
|
||||
saveOrUpdate() {
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
||||
if (this.formobj.createByName == '') {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '制单人姓名不能为空'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (this.formobj.createTime == '') {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '单据日期不能为空'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (this.formobj.list.length == 0) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '请添加商品'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
for (var i = 0; i < this.formobj.list.length; i++) {
|
||||
var item = this.formobj.list[i]
|
||||
if (item.actualCount == 0) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '商品上架数量不能为0'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.$refs['form_obj'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitdisabled = true
|
||||
req.save(this.formobj).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: '保存成功'
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
this.submitdisabled = false
|
||||
}
|
||||
}).catch(() => {
|
||||
this.submitdisabled = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.formobj = {
|
||||
"sid": "",
|
||||
"billNo": "",
|
||||
"createBySid": "",
|
||||
"createByName": "",
|
||||
"createTime": "",
|
||||
"sourceBillNo": "",
|
||||
"sourceBillSid": "",
|
||||
"billState": "新建",
|
||||
"list": [
|
||||
|
||||
],
|
||||
"remarks": ""
|
||||
}
|
||||
this.submitdisabled = false
|
||||
this.$emit('doback')
|
||||
},
|
||||
|
||||
showAdd() {
|
||||
this.title = "【新增】"
|
||||
this.getWarehouseList()
|
||||
},
|
||||
showEdit(row) {
|
||||
this.getWarehouseList()
|
||||
this.title = "【修改】"
|
||||
var params = {
|
||||
sid: row.sid
|
||||
}
|
||||
req.init(params)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = {}
|
||||
})
|
||||
},
|
||||
getWarehouseList() {
|
||||
req2.getWarehouses().then((res) => {
|
||||
if (res.success) {
|
||||
this.warehouseList = res.data
|
||||
|
||||
console.log("aaaaaa", this.warehouseList);
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getWarehouseAreaList(sid) {
|
||||
var query = {
|
||||
ckSid: sid
|
||||
}
|
||||
req2.getWarehouseareas(query).then((res) => {
|
||||
if (res.success) {
|
||||
this.warehouseRackList = res.data
|
||||
|
||||
console.log("aaaaaa", this.warehouseRackList);
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
selectWarehouseName(row, val) {
|
||||
console.log("selectWarehouseName", row);
|
||||
console.log("selectWarehouseName", val);
|
||||
const choose = this.warehouseList.filter((item) => item.sid == val)
|
||||
console.log('>>>>>>>>>selectWarehouseName', choose)
|
||||
row.warehouseName = choose[0].warehouseName
|
||||
row.warehouseSid = choose[0].sid
|
||||
|
||||
},
|
||||
selectWarehouseAreaCode(val) {
|
||||
console.log("selectWarehouseAreaCode", val);
|
||||
|
||||
const choose = this.warehouseRackList.filter((item) => item.sid == val)
|
||||
console.log('>>>>>>>>>selectWarehouseAreaCode', choose)
|
||||
row.warehouseRackName = choose[0].areaCode
|
||||
row.warehouseRackSid = choose[0].sid
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// 隐藏上传组件
|
||||
|
||||
::v-deep .hide {
|
||||
.el-upload--picture-card {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.trightb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.trightb_item {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.span {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-left: 50px;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
border: 1px #fff solid;
|
||||
padding: 0px 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__header {
|
||||
height: 40px;
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
text-align: left;
|
||||
color: #ffffff;
|
||||
background-color: #0294d7;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user