完善项目
This commit is contained in:
@@ -6,6 +6,6 @@ VUE_APP_BASE_API = '/api'
|
|||||||
|
|
||||||
## 配置测试和本地开发时的 接口地址
|
## 配置测试和本地开发时的 接口地址
|
||||||
|
|
||||||
##VUE_APP_URL = "http://127.0.0.1:4523/m1/4061550-0-default"
|
VUE_APP_URL = "http://127.0.0.1:4523/m1/4061550-0-default"
|
||||||
VUE_APP_URL = "http://192.168.0.123:8111"
|
##VUE_APP_URL = "http://192.168.0.123:8111"
|
||||||
##VUE_APP_URL = "https://wms.yxtsoft.com"
|
##VUE_APP_URL = "https://wms.yxtsoft.com"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
|||||||
|
|
||||||
export function typeValues(data) {
|
export function typeValues(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/dictcommons/typeValues',
|
url: '/oms/apiadmin/dictcommons/typeValues',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
@@ -11,7 +11,7 @@ export function typeValues(data) {
|
|||||||
// 获取数据字典(根据分组)
|
// 获取数据字典(根据分组)
|
||||||
export function getTypeValueList(data) {
|
export function getTypeValueList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/dictcommons/getTypeValueList',
|
url: '/oms/apiadmin/dictcommons/getTypeValueList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
@@ -20,7 +20,7 @@ export function getTypeValueList(data) {
|
|||||||
// 根据当前登录人orgSidPath(全路径sid)查询分公司
|
// 根据当前登录人orgSidPath(全路径sid)查询分公司
|
||||||
export function getOrgSidByPath(data) {
|
export function getOrgSidByPath(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysstafforg/getOrgSidByPath',
|
url: '/oms/apiadmin/sysstafforg/getOrgSidByPath',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
@@ -112,14 +112,14 @@ export function customerListPage(params) {
|
|||||||
// 获取省
|
// 获取省
|
||||||
export function getProvince() {
|
export function getProvince() {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/regions/getProvince',
|
url: '/oms/apiadmin/regions/getProvince',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 根据省sid获取该省的所有市
|
// 根据省sid获取该省的所有市
|
||||||
export function getCity(data) {
|
export function getCity(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/regions/getCity',
|
url: '/oms/apiadmin/regions/getCity',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
@@ -127,7 +127,7 @@ export function getCity(data) {
|
|||||||
// 根据市sid获取该市的所有县区
|
// 根据市sid获取该市的所有县区
|
||||||
export function getCounty(data) {
|
export function getCounty(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/regions/getCounty',
|
url: '/oms/apiadmin/regions/getCounty',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
@@ -136,7 +136,7 @@ export function getCounty(data) {
|
|||||||
// 获取售后服务--基础信息--供应商信息
|
// 获取售后服务--基础信息--供应商信息
|
||||||
export function choiceSupplierInfo(data) {
|
export function choiceSupplierInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/supplierinfo/choiceSupplierInfo',
|
url: '/oms/apiadmin/supplierinfo/choiceSupplierInfo',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
@@ -155,7 +155,7 @@ export function chooseproducts(params) {
|
|||||||
// 查询所有仓库
|
// 查询所有仓库
|
||||||
export function getWarehouses(params) {
|
export function getWarehouses(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/base/wmswarehouseinfo/listAll',
|
url: '/oms/apiadmin/base/wmswarehouseinfo/listAll',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params,
|
data: params,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -168,7 +168,7 @@ export function getWarehouses(params) {
|
|||||||
// 根据仓库查询库位
|
// 根据仓库查询库位
|
||||||
export function getWarehouseareas(data) {
|
export function getWarehouseareas(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/base/wmswarehousearea/selectAll',
|
url: '/oms/apiadmin/base/wmswarehousearea/selectAll',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data,
|
params: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
// 查询分页列表
|
|
||||||
listPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouserack/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 修改是否可用状态
|
|
||||||
updateIsEnable: function(sid,isEnable) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouserack/updateIsEnable/'+sid+"/"+isEnable
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 新增、保存
|
|
||||||
saveGoodsShelves: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouserack/saveOrUpdate',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 初始化
|
|
||||||
initGoodsShelves: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouserack/initialization/' + data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
// 列表查询
|
|
||||||
listPage: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/supplierinfo/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 保存
|
|
||||||
saveOrUpdate: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/supplierinfo/save',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 回显
|
|
||||||
fetchDetailsBySid: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/supplierinfo/fetchDetailsBySid/' + data,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 删除
|
|
||||||
delBySids: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/supplierinfo/delBySids',
|
|
||||||
method: 'DELETE',
|
|
||||||
data: data,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 获取供应商类型
|
|
||||||
selSupplierType: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/suppliertype/selSupplierType',
|
|
||||||
method: 'post',
|
|
||||||
params: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
// 列表查询
|
|
||||||
listPage: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/suppliertype/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 保存
|
|
||||||
saveOrUpdate: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/suppliertype/save',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 删除
|
|
||||||
delBySids: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/suppliertype/delBySids',
|
|
||||||
method: 'DELETE',
|
|
||||||
data: data,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
// 查询分页列表
|
|
||||||
listPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouseinfo/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 仓库查询
|
|
||||||
getAllWarehouse: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouseinfo/listAll',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 修改是否可用状态
|
|
||||||
updateIsEnable: function(sid,isEnable) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouseinfo/updateStatus/'+sid+"/"+isEnable
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 新增、保存
|
|
||||||
saveWarehouse: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouseinfo/saveOrUpdate',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 初始化
|
|
||||||
initWarehouse: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouseinfo/initialization/' + data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
// 查询分页列表
|
|
||||||
listPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehousearea/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 库区查询
|
|
||||||
getAllWarehousearea: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehousearea/listAll',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 修改是否可用状态
|
|
||||||
updateIsEnable: function(sid,isEnable) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehousearea/updateIsEnable/'+sid+"/"+isEnable
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 新增、保存
|
|
||||||
saveWarehousearea: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehousearea/saveOrUpdate',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 初始化
|
|
||||||
initWarehousearea: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehousearea/initialization/' + data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
|
|
||||||
// 查询分页列表
|
|
||||||
listPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouseareatype/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 库去类型查询
|
|
||||||
getAllWarehouseareatype: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouseareatype/listAll',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 修改是否可用状态
|
|
||||||
updateIsEnable: function(sid,isEnable) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouseareatype/updateIsEnable/'+sid+"/"+isEnable
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 新增、保存
|
|
||||||
saveWarehousearea: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouseareatype/saveOrUpdate',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 初始化
|
|
||||||
initWarehousearea: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/warehouseareatype/initialization/' + data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
// 查询分页列表
|
|
||||||
listPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodsbrand/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 品牌查询
|
|
||||||
getAllBrand: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodsbrand/listAll',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 修改是否可用状态
|
|
||||||
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,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 初始化
|
|
||||||
initBrands: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodsbrand/initialization/' + data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 品牌-- 删除
|
|
||||||
deleteBySids: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodsbrand/delBySids',
|
|
||||||
method: 'DELETE',
|
|
||||||
data: data,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
// 查询分页列表
|
|
||||||
listPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodstype/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 类别查询
|
|
||||||
getAllType: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodstype/listAll',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 修改是否可用状态
|
|
||||||
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,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 初始化
|
|
||||||
initTypes: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodstype/initialization/' + data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 类别-- 删除
|
|
||||||
deleteBySids: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodstype/delBySids',
|
|
||||||
method: 'DELETE',
|
|
||||||
data: data,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
// 查询分页列表
|
|
||||||
listPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basemanufacturer/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 厂家查询
|
|
||||||
getAllFacturer: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basemanufacturer/listAll',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 修改是否可用状态
|
|
||||||
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,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 初始化
|
|
||||||
initFacturer: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basemanufacturer/initialization/' + data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 厂家-- 删除
|
|
||||||
deleteBySids: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basemanufacturer/delBySids',
|
|
||||||
method: 'DELETE',
|
|
||||||
data: data,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
// 查询分页列表
|
|
||||||
listPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodsspu/listPage',
|
|
||||||
// url: '/wms/apiadmin/base/basegoodsspu/goodsListPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 修改是否可用状态
|
|
||||||
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',
|
|
||||||
// url: '/wms/apiadmin/base/basegoodsspu/saveOrUpdateGoods',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 初始化
|
|
||||||
initGoods: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodsspu/initialization/' + data,
|
|
||||||
// url: '/wms/apiadmin/base/basegoodsspu/goodsDetails/' + data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 商品-- 删除
|
|
||||||
deleteBySids: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodsspu/delBySids',
|
|
||||||
// url: '/wms/apiadmin/base/basegoodsspu/delGoodsBySids',
|
|
||||||
method: 'DELETE',
|
|
||||||
data: data,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 下载模板
|
|
||||||
downloadExcel: function() {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodsspu/download',
|
|
||||||
method: 'post',
|
|
||||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
// 查询分页列表
|
|
||||||
listPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodsunit/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 单位查询
|
|
||||||
getAllUnit: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodsunit/listAll',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 修改是否可用状态
|
|
||||||
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,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 初始化
|
|
||||||
initUnits: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodsunit/initialization/' + data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 单位-- 删除
|
|
||||||
deleteBySids: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/basegoodsunit/delBySids',
|
|
||||||
method: 'DELETE',
|
|
||||||
data: data,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
// 查询分页列表
|
|
||||||
listPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/WmsAnsBill/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 详情初始化
|
|
||||||
init: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/WmsAnsBill/details?sid=' + data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 收货初始化
|
|
||||||
getInitDetails: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/inventory/WmsReceiptBill/getInitDetails?sourceSid=' + data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 新增收货单
|
|
||||||
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'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,104 +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?sid=' + data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 新增、保存
|
|
||||||
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'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 查询所有商品
|
|
||||||
getGoodsListPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/yxtbase/apiadmin/base/basegoodssku/getGoodsListPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
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'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 初始化新增上架单
|
|
||||||
initUpshelf: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/WmsShelfBill/getInit?sid=' + params.sid + "&orgPath=" + params.orgPath + "&userSid=" +
|
|
||||||
params.userSid,
|
|
||||||
method: 'get',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
// 查询分页列表
|
|
||||||
listPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/WmsShelfBill/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 初始化
|
|
||||||
init: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/WmsShelfBill/details?sid='+data,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 新增、保存
|
|
||||||
save: 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/WmsShelfBill/delBySids',
|
|
||||||
method: 'DELETE',
|
|
||||||
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'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -4,7 +4,7 @@ import qs from 'qs'
|
|||||||
const base = process.env.VUE_APP_URL
|
const base = process.env.VUE_APP_URL
|
||||||
|
|
||||||
// 文件上传接口
|
// 文件上传接口
|
||||||
export const uploadFile = process.env.VUE_APP_BASE_API + '/wms/file/upload'
|
export const uploadFile = process.env.VUE_APP_BASE_API + '/oms/file/upload'
|
||||||
// export const uploadFile = process.env.VUE_APP_BASE_API + '/customer/file/upload'
|
// export const uploadFile = process.env.VUE_APP_BASE_API + '/customer/file/upload'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,52 +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'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 查询所有仓库
|
|
||||||
getWarehouses: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/wmswarehouseinfo/listAll',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 根据仓库查询库位
|
|
||||||
getWarehouseareas: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/base/wmswarehousearea/selectAll',
|
|
||||||
method: 'get',
|
|
||||||
params: data,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
// 查询分页列表 -- 库存查询
|
|
||||||
listPage: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/apiadmin/inventory/wmsinventory/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 库存查询 -- 删除
|
|
||||||
deleteBySids: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/riskcenter/v1/LoanLawsuitApply/deleteBySids',
|
|
||||||
method: 'DELETE',
|
|
||||||
data: data,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 库存出入库记录
|
|
||||||
getWmsInventoryRecordList: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/inventory/wmsinventoryrecord/getWmsInventoryRecordList',
|
|
||||||
method: 'get',
|
|
||||||
params: data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 查询分页列表 -- 出入库查询
|
|
||||||
pageList: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/inventory/wmsinventoryrecord/pageList',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
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' }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
// 查询分页列表
|
|
||||||
listPage: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/v1/wmsinventorycheckbill/listPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 新增、保存
|
|
||||||
save: function(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/inventory/wmsinventorycheckbill/save',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 初始化
|
|
||||||
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,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 盘点
|
|
||||||
inven: function(params) {
|
|
||||||
return request({
|
|
||||||
url: '/wms/apiadmin/inventory/wmsinventory/invenGoodsListPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params,
|
|
||||||
headers: { 'Content-Type': 'application/json' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -13,7 +13,7 @@ export function rolemenus(data) {
|
|||||||
// 获取左侧菜单
|
// 获取左侧菜单
|
||||||
export function getrolemenus(data) {
|
export function getrolemenus(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysmenu/sourcemenutree',
|
url: '/oms/apiadmin/sysmenu/sourcemenutree',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: { 'Content-Type': 'application/json',
|
headers: { 'Content-Type': 'application/json',
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ let tokens = window.sessionStorage.getItem('token')
|
|||||||
// 获取菜单 分页列表
|
// 获取菜单 分页列表
|
||||||
export function pageList(data) {
|
export function pageList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysorganization/listPage',
|
url: '/oms/apiadmin/sysorganization/listPage',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -18,7 +18,7 @@ export function pageList(data) {
|
|||||||
// 查询左侧部门列表
|
// 查询左侧部门列表
|
||||||
export function orgList(data) {
|
export function orgList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysorganization/list',
|
url: '/oms/apiadmin/sysorganization/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -30,7 +30,7 @@ export function orgList(data) {
|
|||||||
// 编辑部门信息
|
// 编辑部门信息
|
||||||
export function postOrgtree(data) {
|
export function postOrgtree(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysorganization/update/' + data.sid,
|
url: '/oms/apiadmin/sysorganization/update/' + data.sid,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -42,7 +42,7 @@ export function postOrgtree(data) {
|
|||||||
// 获取 机构分页列表(编辑部门信息)
|
// 获取 机构分页列表(编辑部门信息)
|
||||||
export function putOrgtree(data) {
|
export function putOrgtree(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysorganization/update/' + data.sid,
|
url: '/oms/apiadmin/sysorganization/update/' + data.sid,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -55,7 +55,7 @@ export function putOrgtree(data) {
|
|||||||
// 新增部门信息
|
// 新增部门信息
|
||||||
export function addOrgTree(data) {
|
export function addOrgTree(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysorganization/save',
|
url: '/oms/apiadmin/sysorganization/save',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -79,7 +79,7 @@ export function selectBySid(data) {
|
|||||||
// 树 节点名称 删除
|
// 树 节点名称 删除
|
||||||
export function delOrgtree(data) {
|
export function delOrgtree(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/sysorganization/delBySid/` + data.sid,
|
url: `/oms/apiadmin/sysorganization/delBySid/` + data.sid,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: qs.stringify(data),
|
data: qs.stringify(data),
|
||||||
headers: {
|
headers: {
|
||||||
@@ -88,10 +88,10 @@ export function delOrgtree(data) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 查询主管人员 旧的:/wms/apiadmin/sysstafforg/staffinfoList
|
// 查询主管人员 旧的:/oms/apiadmin/sysstafforg/staffinfoList
|
||||||
export function getStaff(data) {
|
export function getStaff(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysstaffinfo/getStaffNameByDeptSid',
|
url: '/oms/apiadmin/sysstaffinfo/getStaffNameByDeptSid',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data,
|
params: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -103,7 +103,7 @@ export function getStaff(data) {
|
|||||||
// 查询分管人员
|
// 查询分管人员
|
||||||
export function getStaffName(params) {
|
export function getStaffName(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysstaffinfo/getStaffName',
|
url: '/oms/apiadmin/sysstaffinfo/getStaffName',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: params,
|
params: params,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -115,7 +115,7 @@ export function getStaffName(params) {
|
|||||||
// 查看二维码
|
// 查看二维码
|
||||||
export function getQrCode(data) {
|
export function getQrCode(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysorganization/getQrCode/' + data.sid,
|
url: '/oms/apiadmin/sysorganization/getQrCode/' + data.sid,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ let tokens = window.sessionStorage.getItem('token');
|
|||||||
//获取字典子集 分页列表
|
//获取字典子集 分页列表
|
||||||
export function dictCommonList(data) {
|
export function dictCommonList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/dictcommons/pageList',
|
url: '/oms/apiadmin/dictcommons/pageList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json'}
|
headers: {'Content-Type': 'application/json'}
|
||||||
@@ -15,7 +15,7 @@ export function dictCommonList(data) {
|
|||||||
//保存 字典子级
|
//保存 字典子级
|
||||||
export function savedictCommon(data) {
|
export function savedictCommon(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/dictcommons/save',
|
url: '/oms/apiadmin/dictcommons/save',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data ,
|
data: data ,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -36,7 +36,7 @@ export function getRoleInfo(data) {
|
|||||||
//根据sid 修改 数据字典
|
//根据sid 修改 数据字典
|
||||||
export function putdictCommon(data) {
|
export function putdictCommon(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/dictcommons/update/' + data.sid,
|
url: '/oms/apiadmin/dictcommons/update/' + data.sid,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data ,
|
data: data ,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -48,7 +48,7 @@ export function putdictCommon(data) {
|
|||||||
//根据sid 删除菜单 信息
|
//根据sid 删除菜单 信息
|
||||||
export function deldictCommon(data) {
|
export function deldictCommon(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/dictcommons/delete/' + data.sid,
|
url: '/oms/apiadmin/dictcommons/delete/' + data.sid,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ let tokens = window.sessionStorage.getItem('token')
|
|||||||
// 获取菜单 分页列表
|
// 获取菜单 分页列表
|
||||||
export function pageList(data) {
|
export function pageList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/dicttypes/pageList',
|
url: '/oms/apiadmin/dicttypes/pageList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -18,7 +18,7 @@ export function pageList(data) {
|
|||||||
// 根据sid 修改
|
// 根据sid 修改
|
||||||
export function putDictType(data) {
|
export function putDictType(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/dicttypes/update/' + data.sid,
|
url: '/oms/apiadmin/dicttypes/update/' + data.sid,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: qs.stringify(data)
|
data: qs.stringify(data)
|
||||||
})
|
})
|
||||||
@@ -27,7 +27,7 @@ export function putDictType(data) {
|
|||||||
// 保存 角色信息
|
// 保存 角色信息
|
||||||
export function saveDictType(data) {
|
export function saveDictType(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/dicttypes/save',
|
url: '/oms/apiadmin/dicttypes/save',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||||
@@ -46,7 +46,7 @@ export function getRoleInfo(data) {
|
|||||||
// 数据字段--映射管理保存
|
// 数据字段--映射管理保存
|
||||||
export function saveMappingList(data) {
|
export function saveMappingList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysmapping/saveMappingList',
|
url: '/oms/apiadmin/sysmapping/saveMappingList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||||
@@ -56,7 +56,7 @@ export function saveMappingList(data) {
|
|||||||
// 数据字段--映射管理保存
|
// 数据字段--映射管理保存
|
||||||
export function selectMappingListInfo(data) {
|
export function selectMappingListInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysmapping/selectMappingListInfo',
|
url: '/oms/apiadmin/sysmapping/selectMappingListInfo',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||||
@@ -66,7 +66,7 @@ export function selectMappingListInfo(data) {
|
|||||||
// 根据sid 删除菜单 信息
|
// 根据sid 删除菜单 信息
|
||||||
export function delDictType(data) {
|
export function delDictType(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/dicttypes/delete/' + data.sid,
|
url: '/oms/apiadmin/dicttypes/delete/' + data.sid,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
data: data,
|
data: data,
|
||||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ let tokens = window.sessionStorage.getItem('token');
|
|||||||
//获取菜单 分页列表
|
//获取菜单 分页列表
|
||||||
export function logPageList(data) {
|
export function logPageList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/systemlog/listPage',
|
url: '/oms/apiadmin/systemlog/listPage',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ let tokens = window.sessionStorage.getItem('token');
|
|||||||
//获取菜单 分页列表
|
//获取菜单 分页列表
|
||||||
export function pageList(data) {
|
export function pageList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysmenu/listAllVoForSource',
|
url: '/oms/apiadmin/sysmenu/listAllVoForSource',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -20,7 +20,7 @@ export function pageList(data) {
|
|||||||
// 新增保存 菜单信息
|
// 新增保存 菜单信息
|
||||||
export function saveMenusInfo(data) {
|
export function saveMenusInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysmenu/save',
|
url: '/oms/apiadmin/sysmenu/save',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json'}
|
headers: {'Content-Type': 'application/json'}
|
||||||
@@ -30,7 +30,7 @@ export function saveMenusInfo(data) {
|
|||||||
// 修改保存 菜单信息
|
// 修改保存 菜单信息
|
||||||
export function putMenusInfo(data) {
|
export function putMenusInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysmenu/update/' + data.sid,
|
url: '/oms/apiadmin/sysmenu/update/' + data.sid,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json'}
|
headers: {'Content-Type': 'application/json'}
|
||||||
@@ -40,7 +40,7 @@ export function putMenusInfo(data) {
|
|||||||
//根据sid 删除单个 资源信息
|
//根据sid 删除单个 资源信息
|
||||||
export function delMenus(data) {
|
export function delMenus(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysmenu/delBySids/' + data.sid,
|
url: '/oms/apiadmin/sysmenu/delBySids/' + data.sid,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: qs.stringify(data),
|
data: qs.stringify(data),
|
||||||
headers: {
|
headers: {
|
||||||
@@ -53,7 +53,7 @@ export function delMenus(data) {
|
|||||||
// 修改状态
|
// 修改状态
|
||||||
export function IsEnable(data) {
|
export function IsEnable(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysmenu/updateIsEnable/' + data.sid + '/' + data.isEnable,
|
url: '/oms/apiadmin/sysmenu/updateIsEnable/' + data.sid + '/' + data.isEnable,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
/* data: qs.stringify(data),*/
|
/* data: qs.stringify(data),*/
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ let tokens = window.sessionStorage.getItem('token');
|
|||||||
//获取菜单 分页列表
|
//获取菜单 分页列表
|
||||||
export function pageList(data) {
|
export function pageList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/syspost/listPage',
|
url: '/oms/apiadmin/syspost/listPage',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -17,7 +17,7 @@ export function pageList(data) {
|
|||||||
// 查询部门列表
|
// 查询部门列表
|
||||||
export function orgList(data){
|
export function orgList(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysorganization/list',
|
url: '/oms/apiadmin/sysorganization/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -28,7 +28,7 @@ export function orgList(data){
|
|||||||
// 新增
|
// 新增
|
||||||
export function savePost(data){
|
export function savePost(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/syspost/save',
|
url: '/oms/apiadmin/syspost/save',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -39,7 +39,7 @@ export function savePost(data){
|
|||||||
// 修改
|
// 修改
|
||||||
export function putOrgroles(data){
|
export function putOrgroles(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/syspost/update/' +data.sid,
|
url: '/oms/apiadmin/syspost/update/' +data.sid,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -51,7 +51,7 @@ export function putOrgroles(data){
|
|||||||
// 删除
|
// 删除
|
||||||
export function delOrgroles(data){
|
export function delOrgroles(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/syspost/delBySids/' + data.sids,
|
url: '/oms/apiadmin/syspost/delBySids/' + data.sids,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -62,7 +62,7 @@ export function delOrgroles(data){
|
|||||||
|
|
||||||
export function pullDown(data){
|
export function pullDown(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/dictcommons/typeValues',
|
url: '/oms/apiadmin/dictcommons/typeValues',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
@@ -71,7 +71,7 @@ export function pullDown(data){
|
|||||||
// 查询岗位列表
|
// 查询岗位列表
|
||||||
export function selectList(data){
|
export function selectList(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/syspost/selectList',
|
url: '/oms/apiadmin/syspost/selectList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ let tokens = window.sessionStorage.getItem('token');
|
|||||||
// 业务角色 列表
|
// 业务角色 列表
|
||||||
export function roleOrgList(data){
|
export function roleOrgList(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysrole/listPage',
|
url: '/oms/apiadmin/sysrole/listPage',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -16,7 +16,7 @@ export function roleOrgList(data){
|
|||||||
|
|
||||||
export function postList(data){
|
export function postList(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/syspost/list',
|
url: '/oms/apiadmin/syspost/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json'}
|
headers: {'Content-Type': 'application/json'}
|
||||||
@@ -26,7 +26,7 @@ export function postList(data){
|
|||||||
// 获取数据字典下拉列表
|
// 获取数据字典下拉列表
|
||||||
export function typeValues(data) {
|
export function typeValues(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/dictcommons/typeValues',
|
url: '/oms/apiadmin/dictcommons/typeValues',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
@@ -35,7 +35,7 @@ export function typeValues(data) {
|
|||||||
// 设置是否可用:isEnable:1可用,0不可用
|
// 设置是否可用:isEnable:1可用,0不可用
|
||||||
export function setRoleEnable(data) {
|
export function setRoleEnable(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysrole/setIsEnable/' + data.sid + '/' + data.isEnable,
|
url: '/oms/apiadmin/sysrole/setIsEnable/' + data.sid + '/' + data.isEnable,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -52,7 +52,7 @@ export function setRoleEnable(data) {
|
|||||||
* */
|
* */
|
||||||
export function saveOrgroles(data) {
|
export function saveOrgroles(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysrole/save',
|
url: '/oms/apiadmin/sysrole/save',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -69,7 +69,7 @@ export function saveOrgroles(data) {
|
|||||||
* */
|
* */
|
||||||
export function putOrgroles(data) {
|
export function putOrgroles(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/sysrole/update/${data.sid}`,
|
url: `/oms/apiadmin/sysrole/update/${data.sid}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -84,7 +84,7 @@ export function putOrgroles(data) {
|
|||||||
* */
|
* */
|
||||||
export function delOrgroles(data) {
|
export function delOrgroles(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/sysrole/delBySids/${data.sid}`,
|
url: `/oms/apiadmin/sysrole/delBySids/${data.sid}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -95,7 +95,7 @@ export function delOrgroles(data) {
|
|||||||
// 移动端授权
|
// 移动端授权
|
||||||
export function getRoleMenuList(data) {
|
export function getRoleMenuList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysmobilemenurole/getRoleMenuList',
|
url: '/oms/apiadmin/sysmobilemenurole/getRoleMenuList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: { roleSid: data }
|
params: { roleSid: data }
|
||||||
})
|
})
|
||||||
@@ -104,7 +104,7 @@ export function getRoleMenuList(data) {
|
|||||||
// 菜单授权保存
|
// 菜单授权保存
|
||||||
export function saveRoleMenuList(data) {
|
export function saveRoleMenuList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/sysmobilemenurole/saveRoleMenuList`,
|
url: `/oms/apiadmin/sysmobilemenurole/saveRoleMenuList`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -116,7 +116,7 @@ export function saveRoleMenuList(data) {
|
|||||||
// 菜单授权
|
// 菜单授权
|
||||||
export function roleMenuTree(data) {
|
export function roleMenuTree(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/sysmenu/listAllByRoleSid`,
|
url: `/oms/apiadmin/sysmenu/listAllByRoleSid`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -128,7 +128,7 @@ export function roleMenuTree(data) {
|
|||||||
// 菜单授权保存
|
// 菜单授权保存
|
||||||
export function saveorgrolemenus(data) {
|
export function saveorgrolemenus(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/sysrikeauthorize/updateRoleAndMenu`,
|
url: `/oms/apiadmin/sysrikeauthorize/updateRoleAndMenu`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -139,7 +139,7 @@ export function saveorgrolemenus(data) {
|
|||||||
// 资源授权
|
// 资源授权
|
||||||
export function sourceMenuTree(data) {
|
export function sourceMenuTree(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/syssource/listAllByRoleSid`,
|
url: `/oms/apiadmin/syssource/listAllByRoleSid`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -150,7 +150,7 @@ export function sourceMenuTree(data) {
|
|||||||
// 资源授权保存
|
// 资源授权保存
|
||||||
export function saveSource(data) {
|
export function saveSource(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/syssourcerole/updateRoleAndSource`,
|
url: `/oms/apiadmin/syssourcerole/updateRoleAndSource`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -161,14 +161,14 @@ export function saveSource(data) {
|
|||||||
// 功能授权
|
// 功能授权
|
||||||
export function funMenuTree(data) {
|
export function funMenuTree(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/sysfunction/getFunctionAuthorization/` + data.roleSid,
|
url: `/oms/apiadmin/sysfunction/getFunctionAuthorization/` + data.roleSid,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 功能授权保存
|
// 功能授权保存
|
||||||
export function savefunMenu(data) {
|
export function savefunMenu(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/sysrolefunction/updateRoleAndFunction`,
|
url: `/oms/apiadmin/sysrolefunction/updateRoleAndFunction`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -180,7 +180,7 @@ export function savefunMenu(data) {
|
|||||||
// 角色授权
|
// 角色授权
|
||||||
export function selMenuByRole(data) {
|
export function selMenuByRole(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/sysmenurole/selMenuByRole`,
|
url: `/oms/apiadmin/sysmenurole/selMenuByRole`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||||
@@ -190,7 +190,7 @@ export function selMenuByRole(data) {
|
|||||||
// 角色授权保存
|
// 角色授权保存
|
||||||
export function updateDataByRoleMenu(data) {
|
export function updateDataByRoleMenu(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/sysmenurole/updateDataByRoleMenu`,
|
url: `/oms/apiadmin/sysmenurole/updateDataByRoleMenu`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import qs from 'qs'
|
|||||||
* */
|
* */
|
||||||
export function roleMenuTree(data){
|
export function roleMenuTree(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/orgrolemenus/menutree',
|
url: '/oms/apiadmin/orgrolemenus/menutree',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json'}
|
headers: {'Content-Type': 'application/json'}
|
||||||
@@ -23,7 +23,7 @@ export function roleMenuTree(data){
|
|||||||
* */
|
* */
|
||||||
export function saveorgrolemenus(data){
|
export function saveorgrolemenus(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/orgrolemenus',
|
url: '/oms/apiadmin/orgrolemenus',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json'}
|
headers: {'Content-Type': 'application/json'}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import qs from 'qs'
|
|||||||
let tokens = window.sessionStorage.getItem('token');
|
let tokens = window.sessionStorage.getItem('token');
|
||||||
export function userList(data){
|
export function userList(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/listPage',
|
url: '/oms/apiadmin/sysuser/listPage',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -16,7 +16,7 @@ export function userList(data){
|
|||||||
// 新增
|
// 新增
|
||||||
export function userAdd(data){
|
export function userAdd(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/save',
|
url: '/oms/apiadmin/sysuser/save',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -27,7 +27,7 @@ export function userAdd(data){
|
|||||||
// 更新
|
// 更新
|
||||||
export function userUpdata(data){
|
export function userUpdata(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/update/' +data.sid,
|
url: '/oms/apiadmin/sysuser/update/' +data.sid,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -39,7 +39,7 @@ export function userUpdata(data){
|
|||||||
// 删除
|
// 删除
|
||||||
export function delUser(data){
|
export function delUser(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/delBySid/' +data.sid,
|
url: '/oms/apiadmin/sysuser/delBySid/' +data.sid,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -50,7 +50,7 @@ export function delUser(data){
|
|||||||
// 初始化密码
|
// 初始化密码
|
||||||
export function initPwd(data){
|
export function initPwd(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/initPwd/' +data.sid,
|
url: '/oms/apiadmin/sysuser/initPwd/' +data.sid,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -61,7 +61,7 @@ export function initPwd(data){
|
|||||||
// 根据sid查询一条信息
|
// 根据sid查询一条信息
|
||||||
export function userSingle(data){
|
export function userSingle(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/fetchBySid/' +data.sid,
|
url: '/oms/apiadmin/sysuser/fetchBySid/' +data.sid,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -72,7 +72,7 @@ export function userSingle(data){
|
|||||||
// 单条用户的角色列表
|
// 单条用户的角色列表
|
||||||
export function setRole(data){
|
export function setRole(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysrole/listAllByUserSid/' +data.sid,
|
url: '/oms/apiadmin/sysrole/listAllByUserSid/' +data.sid,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -83,7 +83,7 @@ export function setRole(data){
|
|||||||
// 角色列表
|
// 角色列表
|
||||||
export function saveOrgRole(data){
|
export function saveOrgRole(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuserrole/update',
|
url: '/oms/apiadmin/sysuserrole/update',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -94,7 +94,7 @@ export function saveOrgRole(data){
|
|||||||
// 查询角色列表
|
// 查询角色列表
|
||||||
export function roleList(data){
|
export function roleList(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysrole/listAll',
|
url: '/oms/apiadmin/sysrole/listAll',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -105,7 +105,7 @@ export function roleList(data){
|
|||||||
// 查询部门列表
|
// 查询部门列表
|
||||||
export function orgList(data){
|
export function orgList(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysorganization/list',
|
url: '/oms/apiadmin/sysorganization/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -116,7 +116,7 @@ export function orgList(data){
|
|||||||
// 查询岗位列表
|
// 查询岗位列表
|
||||||
export function postList(data){
|
export function postList(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/syspost/fetchByOrgSid/'+data.sid,
|
url: '/oms/apiadmin/syspost/fetchByOrgSid/'+data.sid,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -128,7 +128,7 @@ export function postList(data){
|
|||||||
// 获取验证码
|
// 获取验证码
|
||||||
export function getCode(data){
|
export function getCode(data){
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/sendMessageCode/'+data.phone,
|
url: '/oms/apiadmin/sysuser/sendMessageCode/'+data.phone,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {'Content-Type': 'application/json',
|
headers: {'Content-Type': 'application/json',
|
||||||
@@ -140,7 +140,7 @@ export function getCode(data){
|
|||||||
// 设置是否可用:isEnable:1可用,0不可用
|
// 设置是否可用:isEnable:1可用,0不可用
|
||||||
export function setRoleEnable(data) {
|
export function setRoleEnable(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/setIsEnable/' + data.sid + '/' + data.isEnable,
|
url: '/oms/apiadmin/sysuser/setIsEnable/' + data.sid + '/' + data.isEnable,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import qs from 'qs'
|
|||||||
// 登录
|
// 登录
|
||||||
export function doLogin(data) {
|
export function doLogin(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/login',
|
url: '/oms/apiadmin/sysuser/login',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -17,7 +17,7 @@ export function doLogin(data) {
|
|||||||
// 注册发送验证码
|
// 注册发送验证码
|
||||||
export function registerSendMessageCode(code) {
|
export function registerSendMessageCode(code) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/sendMessageCode/?mobile=' + code,
|
url: '/oms/apiadmin/sysuser/sendMessageCode/?mobile=' + code,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
@@ -29,7 +29,7 @@ export function registerSendMessageCode(code) {
|
|||||||
// 用户注册
|
// 用户注册
|
||||||
export function registUser(data) {
|
export function registUser(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/register',
|
url: '/oms/apiadmin/sysuser/register',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -42,7 +42,7 @@ export function registUser(data) {
|
|||||||
// 绑定企业/组织
|
// 绑定企业/组织
|
||||||
export function bindOrganization(data) {
|
export function bindOrganization(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/bindOrganization',
|
url: '/oms/apiadmin/sysuser/bindOrganization',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -55,7 +55,7 @@ export function bindOrganization(data) {
|
|||||||
// 选择企业/组织sid
|
// 选择企业/组织sid
|
||||||
export function selOrganization(data) {
|
export function selOrganization(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/sysuser/selOrganization',
|
url: '/oms/apiadmin/sysuser/selOrganization',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -49,238 +49,238 @@ export const constantRoutes = [
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
// {
|
||||||
path: '/baseInfo',
|
// path: '/baseInfo',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
redirect: null,
|
// redirect: null,
|
||||||
meta: {
|
// meta: {
|
||||||
title: '基础信息'
|
// title: '基础信息'
|
||||||
},
|
// },
|
||||||
children: [{
|
// children: [{
|
||||||
path: '/warehouses/warehouse',
|
// path: '/warehouses/warehouse',
|
||||||
name: 'Warehouse',
|
// name: 'Warehouse',
|
||||||
component: () => import('@/views/baseInfo/warehouses/warehouse/index'),
|
// component: () => import('@/views/baseInfo/warehouses/warehouse/index'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '仓库管理',
|
// title: '仓库管理',
|
||||||
icon: 'product-add'
|
// icon: 'product-add'
|
||||||
},
|
// },
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/warehouses/warehouseArea',
|
// path: '/warehouses/warehouseArea',
|
||||||
name: 'WarehouseArea',
|
// name: 'WarehouseArea',
|
||||||
component: () => import('@/views/baseInfo/warehouses/warehouseArea/index'),
|
// component: () => import('@/views/baseInfo/warehouses/warehouseArea/index'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '库区管理',
|
// title: '库区管理',
|
||||||
icon: 'product-add'
|
// icon: 'product-add'
|
||||||
},
|
// },
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/warehouses/warehouseAreaType',
|
// path: '/warehouses/warehouseAreaType',
|
||||||
name: 'WarehouseAreaType',
|
// name: 'WarehouseAreaType',
|
||||||
component: () => import('@/views/baseInfo/warehouses/warehouseAreaType/index'),
|
// component: () => import('@/views/baseInfo/warehouses/warehouseAreaType/index'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '库区类型管理',
|
// title: '库区类型管理',
|
||||||
icon: 'product-add'
|
// icon: 'product-add'
|
||||||
},
|
// },
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/warehouses/goodsShelves',
|
// path: '/warehouses/goodsShelves',
|
||||||
name: 'GoodsShelves',
|
// name: 'GoodsShelves',
|
||||||
component: () => import('@/views/baseInfo/warehouses/goodsShelves/index'),
|
// component: () => import('@/views/baseInfo/warehouses/goodsShelves/index'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '库位管理',
|
// title: '库位管理',
|
||||||
icon: 'product-add'
|
// icon: 'product-add'
|
||||||
},
|
// },
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/supplier/supplier',
|
// path: '/supplier/supplier',
|
||||||
name: 'Supplier',
|
// name: 'Supplier',
|
||||||
component: () => import('@/views/baseInfo/supplier/supplier/supplier'),
|
// component: () => import('@/views/baseInfo/supplier/supplier/supplier'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '供应商管理',
|
// title: '供应商管理',
|
||||||
icon: 'product-add'
|
// icon: 'product-add'
|
||||||
},
|
// },
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/supplier/suppliertype',
|
// path: '/supplier/suppliertype',
|
||||||
name: 'Suppliertype',
|
// name: 'Suppliertype',
|
||||||
component: () => import('@/views/baseInfo/supplier/suppliertype/suppliertype'),
|
// component: () => import('@/views/baseInfo/supplier/suppliertype/suppliertype'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '供应商类型管理',
|
// title: '供应商类型管理',
|
||||||
icon: 'product-add'
|
// icon: 'product-add'
|
||||||
},
|
// },
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
|
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/goods',
|
// path: '/goods',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
redirect: null,
|
// redirect: null,
|
||||||
meta: {
|
// meta: {
|
||||||
title: '商品管理'
|
// title: '商品管理'
|
||||||
},
|
// },
|
||||||
children: [{
|
// children: [{
|
||||||
path: '/brands/index',
|
// path: '/brands/index',
|
||||||
name: 'Brands',
|
// name: 'Brands',
|
||||||
component: () => import('@/views/goods/brands/index'),
|
// component: () => import('@/views/goods/brands/index'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '品牌管理',
|
// title: '品牌管理',
|
||||||
icon: 'product-add'
|
// icon: 'product-add'
|
||||||
},
|
// },
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/category/index',
|
// path: '/category/index',
|
||||||
name: 'Category',
|
// name: 'Category',
|
||||||
component: () => import('@/views/goods/category/index'),
|
// component: () => import('@/views/goods/category/index'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '商品类别',
|
// title: '商品类别',
|
||||||
icon: 'product-add'
|
// icon: 'product-add'
|
||||||
},
|
// },
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/factory/index',
|
// path: '/factory/index',
|
||||||
name: 'Factory',
|
// name: 'Factory',
|
||||||
component: () => import('@/views/goods/factory/index'),
|
// component: () => import('@/views/goods/factory/index'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '厂家管理',
|
// title: '厂家管理',
|
||||||
icon: 'product-add'
|
// icon: 'product-add'
|
||||||
},
|
// },
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/unit/index',
|
// path: '/unit/index',
|
||||||
name: 'Unit',
|
// name: 'Unit',
|
||||||
component: () => import('@/views/goods/unit/index'),
|
// component: () => import('@/views/goods/unit/index'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '计量单位',
|
// title: '计量单位',
|
||||||
icon: 'product-add'
|
// icon: 'product-add'
|
||||||
},
|
// },
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/goods/index',
|
// path: '/goods/index',
|
||||||
name: 'Goods',
|
// name: 'Goods',
|
||||||
component: () => import('@/views/goods/goods/index'),
|
// component: () => import('@/views/goods/goods/index'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '商品管理',
|
// title: '商品管理',
|
||||||
icon: 'product-add'
|
// icon: 'product-add'
|
||||||
},
|
// },
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
|
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/inStorage',
|
// path: '/inStorage',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
redirect: '/inStorage',
|
// redirect: '/inStorage',
|
||||||
meta: {
|
// meta: {
|
||||||
title: '入库管理'
|
// title: '入库管理'
|
||||||
},
|
// },
|
||||||
children: [{
|
// children: [{
|
||||||
path: '/deliveryNotice/index',
|
// path: '/deliveryNotice/index',
|
||||||
component: () => import('@/views/inStorage/deliveryNotice/index'),
|
// component: () => import('@/views/inStorage/deliveryNotice/index'),
|
||||||
name: 'DeliveryNotice',
|
// name: 'DeliveryNotice',
|
||||||
meta: {
|
// meta: {
|
||||||
title: '到货通知单',
|
// title: '到货通知单',
|
||||||
noCache: true
|
// noCache: true
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/receivingGoods/index',
|
// path: '/receivingGoods/index',
|
||||||
component: () => import('@/views/inStorage/receivingGoods/index'),
|
// component: () => import('@/views/inStorage/receivingGoods/index'),
|
||||||
name: 'ReceivingGoods',
|
// name: 'ReceivingGoods',
|
||||||
meta: {
|
// meta: {
|
||||||
title: '收货单管理',
|
// title: '收货单管理',
|
||||||
noCache: true
|
// noCache: true
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/upShelf/index',
|
// path: '/upShelf/index',
|
||||||
component: () => import('@/views/inStorage/upShelf/index'),
|
// component: () => import('@/views/inStorage/upShelf/index'),
|
||||||
name: 'UpShelf',
|
// name: 'UpShelf',
|
||||||
meta: {
|
// meta: {
|
||||||
title: '上架单管理',
|
// title: '上架单管理',
|
||||||
noCache: true
|
// noCache: true
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
// {
|
||||||
path: '/outStorage',
|
// path: '/outStorage',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
redirect: '/outStorage',
|
// redirect: '/outStorage',
|
||||||
meta: {
|
// meta: {
|
||||||
title: '出库管理'
|
// title: '出库管理'
|
||||||
},
|
// },
|
||||||
children: [{
|
// children: [{
|
||||||
path: '/outStorage/index',
|
// path: '/outStorage/index',
|
||||||
component: () => import('@/views/outStorage/index'),
|
// component: () => import('@/views/outStorage/index'),
|
||||||
name: 'OutStorage',
|
// name: 'OutStorage',
|
||||||
meta: {
|
// meta: {
|
||||||
title: '出库单管理',
|
// title: '出库单管理',
|
||||||
noCache: true
|
// noCache: true
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
// {
|
||||||
path: '/storage',
|
// path: '/storage',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
redirect: '/storage',
|
// redirect: '/storage',
|
||||||
meta: {
|
// meta: {
|
||||||
title: '库存管理'
|
// title: '库存管理'
|
||||||
},
|
// },
|
||||||
children: [{
|
// children: [{
|
||||||
path: '/inventory/inventory',
|
// path: '/inventory/inventory',
|
||||||
component: () => import('@/views/storage/inventory/inventory.vue'),
|
// component: () => import('@/views/storage/inventory/inventory.vue'),
|
||||||
name: 'Inventory',
|
// name: 'Inventory',
|
||||||
meta: {
|
// meta: {
|
||||||
title: '库存查询',
|
// title: '库存查询',
|
||||||
noCache: true
|
// noCache: true
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/stocktaking/index',
|
// path: '/stocktaking/index',
|
||||||
component: () => import('@/views/storage/stocktaking/index'),
|
// component: () => import('@/views/storage/stocktaking/index'),
|
||||||
name: 'Stocktaking',
|
// name: 'Stocktaking',
|
||||||
meta: {
|
// meta: {
|
||||||
title: '盘点管理',
|
// title: '盘点管理',
|
||||||
noCache: true
|
// noCache: true
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
// {
|
||||||
path: '/reports',
|
// path: '/reports',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
redirect: '/reports',
|
// redirect: '/reports',
|
||||||
meta: {
|
// meta: {
|
||||||
title: '报表管理'
|
// title: '报表管理'
|
||||||
},
|
// },
|
||||||
children: [ {
|
// children: [ {
|
||||||
path: '/inOutStorage/index',
|
// path: '/inOutStorage/index',
|
||||||
component: () => import('@/views/reports/inOutStorage/index.vue'),
|
// component: () => import('@/views/reports/inOutStorage/index.vue'),
|
||||||
name: 'InventoryRefer',
|
// name: 'InventoryRefer',
|
||||||
meta: { title: '出入库查询', noCache: true }
|
// meta: { title: '出入库查询', noCache: true }
|
||||||
},
|
// },
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,174 +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" @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/Common/dictcommons'
|
|
||||||
|
|
||||||
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>
|
|
||||||
@@ -1,270 +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.supplierName" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<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;">
|
|
||||||
<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>
|
|
||||||
<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 主页面主要部分-->
|
|
||||||
<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>
|
|
||||||
<!--新增及修改 -->
|
|
||||||
<supplierAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList" />
|
|
||||||
<!-- 详情 -->
|
|
||||||
<supplierInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import Pagination from '@/components/pagination'
|
|
||||||
import pageye from '@/components/pagination/pageye'
|
|
||||||
import ButtonBar from '@/components/ButtonBar'
|
|
||||||
import req from '@/api/baseinfo/supplier/supplier.js'
|
|
||||||
import supplierAdd from './supplierAdd'
|
|
||||||
import supplierInfo from './supplierInfo'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Supplier',
|
|
||||||
components: {
|
|
||||||
Pagination,
|
|
||||||
pageye,
|
|
||||||
ButtonBar,
|
|
||||||
supplierAdd,
|
|
||||||
supplierInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
btndisabled: 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: {
|
|
||||||
supplierName: '',
|
|
||||||
supplierTypeName: '',
|
|
||||||
contactTelePhone: '',
|
|
||||||
contactName: ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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
|
|
||||||
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: {
|
|
||||||
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: '请选择至少一条记录进行删除操作' })
|
|
||||||
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(() => {
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 修改、编辑、详情返回列表页面
|
|
||||||
resetState() {
|
|
||||||
this.viewState = 1
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.$store.dispatch('tagsView/delView', this.$route)
|
|
||||||
this.$router.go(-1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
</style>
|
|
||||||
@@ -1,475 +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">
|
|
||||||
<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.baseSupplierBankList" :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/Common/dictcommons'
|
|
||||||
|
|
||||||
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: '',
|
|
||||||
baseSupplierBankList: []
|
|
||||||
},
|
|
||||||
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.baseSupplierBankList.splice(index, 1)
|
|
||||||
},
|
|
||||||
backData(value, index) {
|
|
||||||
this.viewState = 1
|
|
||||||
value = JSON.parse(JSON.stringify(value))
|
|
||||||
if (index !== '' && index !== null) {
|
|
||||||
this.formobj.baseSupplierBankList[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.baseSupplierBankList.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: '',
|
|
||||||
baseSupplierBankList: []
|
|
||||||
}
|
|
||||||
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>
|
|
||||||
@@ -1,236 +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">
|
|
||||||
<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>
|
|
||||||
@@ -1,296 +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.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,232 +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.warehouseName" placeholder="请选择所属仓库" class="item_input"
|
|
||||||
@change="selectWarehouseChange">
|
|
||||||
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" :value="item.sid" />
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">选择所属库区:</span>
|
|
||||||
<el-select v-model="formobj.locationName" placeholder="请选择所属库区" class="item_input"
|
|
||||||
@change="selectWarehouseAreaChange">
|
|
||||||
<el-option v-for="item in warehouseAreaList" :key="item.sid" :label="item.areaName" :value="item.sid" />
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">库位名称:</span>
|
|
||||||
<el-input v-model="formobj.rackName" placeholder="库位名称" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">库位编码:</span>
|
|
||||||
<el-input v-model="formobj.rackCode" 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/goodsShelves/goodsShelves.js'
|
|
||||||
import req2 from '@/api/baseinfo/warehouse/warehouse.js'
|
|
||||||
import req3 from '@/api/baseinfo/warehouseArea/warehouseArea.js'
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
sid: '',
|
|
||||||
rackName: '',
|
|
||||||
rackCode: '',
|
|
||||||
warehouseName: '',
|
|
||||||
warehouseSid: '',
|
|
||||||
locationName: '',
|
|
||||||
locationSid: '',
|
|
||||||
remarks: '',
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
|
|
||||||
},
|
|
||||||
warehouseList: [],
|
|
||||||
warehouseAreaList: [],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.initData()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData() {
|
|
||||||
var parpams = {
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
}
|
|
||||||
req2.getAllWarehouse(parpams).then(resp => {
|
|
||||||
this.warehouseList = resp.data
|
|
||||||
})
|
|
||||||
|
|
||||||
req3.getAllWarehousearea(parpams).then(resp => {
|
|
||||||
this.warehouseAreaList = resp.data
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
saveOrUpdate() {
|
|
||||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
|
||||||
req.saveGoodsShelves(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: '',
|
|
||||||
rackName: '',
|
|
||||||
rackCode: '',
|
|
||||||
warehouseName: '',
|
|
||||||
warehouseSid: '',
|
|
||||||
locationName: '',
|
|
||||||
locationSid: '',
|
|
||||||
remarks: '',
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
}
|
|
||||||
this.$emit('doback')
|
|
||||||
},
|
|
||||||
showAdd() {},
|
|
||||||
showEdit(row) {
|
|
||||||
req.initGoodsShelves(row.sid)
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.formobj = resp.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
this.formobj = row
|
|
||||||
})
|
|
||||||
},
|
|
||||||
selectWarehouseChange(val) {
|
|
||||||
const choose = this.warehouseList.filter((item) => item.sid == val)
|
|
||||||
console.log('>>>>>>>>>selectWarehouseChange', choose)
|
|
||||||
this.formobj.warehouseSid = choose[0].sid
|
|
||||||
this.formobj.warehouseName = choose[0].warehouseName
|
|
||||||
},
|
|
||||||
selectWarehouseAreaChange(val) {
|
|
||||||
const choose = this.warehouseAreaList.filter((item) => item.sid == val)
|
|
||||||
console.log('>>>>>>>>>selectWarehouseAreaChange', choose)
|
|
||||||
this.formobj.locationSid = choose[0].sid
|
|
||||||
this.formobj.locationName = choose[0].areaName
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</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,262 +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="rackName" label="库位名称" align="center" />
|
|
||||||
<el-table-column prop="rackCode" label="库位编码" align="center" />
|
|
||||||
<el-table-column prop="warehouseName" label="所属仓库" align="center" />
|
|
||||||
<el-table-column prop="locationName" 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/goodsShelves/goodsShelves.js'
|
|
||||||
import ButtonBar from '@/components/ButtonBar'
|
|
||||||
import Pagination from '@/components/pagination'
|
|
||||||
import pageye from '@/components/pagination/pageye'
|
|
||||||
import divAdd from './goodsShelvesAdd.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,268 +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="120">
|
|
||||||
<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="warehouseName" label="仓库名称" align="center" />
|
|
||||||
<el-table-column prop="warehouseCode" label="仓库编码" align="center" />
|
|
||||||
<el-table-column prop="manager" label="仓库主管" align="center" />
|
|
||||||
<el-table-column prop="telephone" label="联系电话" align="center" />
|
|
||||||
<el-table-column prop="squareMeter" label="占地面积" align="center" />
|
|
||||||
<el-table-column prop="address" 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/warehouse/warehouse.js'
|
|
||||||
import ButtonBar from '@/components/ButtonBar'
|
|
||||||
import Pagination from '@/components/pagination'
|
|
||||||
import pageye from '@/components/pagination/pageye'
|
|
||||||
import divAdd from './warehouseAdd.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
|
|
||||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
|
|
||||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
this.queryParams.params.menuUrl = this.$route.path
|
|
||||||
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,248 +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.warehouseName" placeholder="仓库名称" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">仓库编码:</span>
|
|
||||||
<el-input v-model="formobj.warehouseCode" 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.contacts" placeholder="仓库联系人" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">手机号码:</span>
|
|
||||||
<el-input v-model="formobj.mob" placeholder="手机号码" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">仓库主管:</span>
|
|
||||||
<el-input v-model="formobj.manager" placeholder="仓库主管" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">联系电话:</span>
|
|
||||||
<el-input v-model="formobj.telephone" placeholder="联系电话" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">占地面积:</span>
|
|
||||||
<el-input v-model="formobj.squareMeter" 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.longitude" placeholder="仓库经度" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">仓库纬度:</span>
|
|
||||||
<el-input v-model="formobj.latitude" placeholder="仓库纬度" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">具体地址:</span>
|
|
||||||
<el-input v-model="formobj.address" placeholder="具体地址" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">使用状态:</span>
|
|
||||||
<el-radio-group v-model="formobj.usageStatus" size="small" @change="changeTheme" class="item_input">
|
|
||||||
<el-radio :label="1">正常</el-radio>
|
|
||||||
<el-radio :label="0">停用</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
<!-- <el-input v-model="formobj.usageStatus" 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/warehouse/warehouse.js'
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
sid: '',
|
|
||||||
warehouseName: '',
|
|
||||||
warehouseCode: '',
|
|
||||||
contacts: "",
|
|
||||||
mob: "",
|
|
||||||
telephone: "",
|
|
||||||
manager: '',
|
|
||||||
longitude: '',
|
|
||||||
latitude: '',
|
|
||||||
usageStatus: "",
|
|
||||||
address: '',
|
|
||||||
squareMeter: '',
|
|
||||||
sortNo: '',
|
|
||||||
remarks: '',
|
|
||||||
warehouseType: "0",
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {},
|
|
||||||
methods: {
|
|
||||||
changeTheme(val) {
|
|
||||||
|
|
||||||
},
|
|
||||||
saveOrUpdate() {
|
|
||||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
|
||||||
req.saveWarehouse(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: '',
|
|
||||||
warehouseName: '',
|
|
||||||
warehouseCode: '',
|
|
||||||
contacts: "",
|
|
||||||
mob: "",
|
|
||||||
telephone: "",
|
|
||||||
manager: '',
|
|
||||||
longitude: '',
|
|
||||||
latitude: '',
|
|
||||||
usageStatus: "",
|
|
||||||
address: '',
|
|
||||||
squareMeter: '',
|
|
||||||
sortNo: '',
|
|
||||||
remarks: '',
|
|
||||||
warehouseType: "0",
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
}
|
|
||||||
this.$emit('doback')
|
|
||||||
},
|
|
||||||
showAdd() {},
|
|
||||||
showEdit(row) {
|
|
||||||
req.initWarehouse(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,267 +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="areaName" label="库区名称" align="center" />
|
|
||||||
<el-table-column prop="areaCode" label="库区编码" align="center" />
|
|
||||||
<el-table-column prop="volume" label="库区容量" align="center" />
|
|
||||||
<el-table-column prop="unit" label="计量单位" align="center" />
|
|
||||||
<el-table-column prop="areaTypeName" label="库区类型" align="center" />
|
|
||||||
<el-table-column prop="warehouseName" 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/warehouseArea/warehouseArea.js'
|
|
||||||
import ButtonBar from '@/components/ButtonBar'
|
|
||||||
import Pagination from '@/components/pagination'
|
|
||||||
import pageye from '@/components/pagination/pageye'
|
|
||||||
import divAdd from './warehouseAreaAdd.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
|
|
||||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
|
|
||||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
this.queryParams.params.menuUrl = this.$route.path
|
|
||||||
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,245 +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.warehouseName" placeholder="请选择所属仓库" class="item_input"
|
|
||||||
@change="selectWarehouseChange">
|
|
||||||
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" :value="item.sid" />
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">库区名称:</span>
|
|
||||||
<el-input v-model="formobj.areaName" placeholder="库区名称" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">库区编码:</span>
|
|
||||||
<el-input v-model="formobj.areaCode" 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.volume" 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.unit" placeholder="计量单位" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text">库区类型:</span>
|
|
||||||
<el-select v-model="formobj.areaTypeName" placeholder="请选择库区类型" class="item_input"
|
|
||||||
@change="selectWarehouseTypeValueChange">
|
|
||||||
<el-option v-for="item in warehouseTypeList" :key="item.sid" :label="item.warehouseAreaTypeName"
|
|
||||||
:value="item.sid" />
|
|
||||||
</el-select>
|
|
||||||
</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/warehouseArea/warehouseArea.js'
|
|
||||||
import req2 from '@/api/baseinfo/warehouse/warehouse.js'
|
|
||||||
import req3 from '@/api/baseinfo/warehouseAreaType/warehouseAreaType.js'
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
sid: '',
|
|
||||||
areaName: '',
|
|
||||||
areaCode: '',
|
|
||||||
volume: '',
|
|
||||||
unit: '',
|
|
||||||
remarks: '',
|
|
||||||
warehouseName: '',
|
|
||||||
warehouseSid: '',
|
|
||||||
areaTypeSid: "",
|
|
||||||
areaTypeName: "",
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
|
|
||||||
},
|
|
||||||
warehouseList: [],
|
|
||||||
warehouseTypeList: [],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.initData()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData() {
|
|
||||||
var parpams = {
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
}
|
|
||||||
req2.getAllWarehouse(parpams).then(resp => {
|
|
||||||
this.warehouseList = resp.data
|
|
||||||
})
|
|
||||||
|
|
||||||
req3.getAllWarehouseareatype(parpams).then(resp => {
|
|
||||||
this.warehouseTypeList = resp.data
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
saveOrUpdate() {
|
|
||||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
|
||||||
req.saveWarehousearea(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: '',
|
|
||||||
areaName: '',
|
|
||||||
areaCode: '',
|
|
||||||
volume: '',
|
|
||||||
unit: '',
|
|
||||||
remarks: '',
|
|
||||||
areaTypeSid: "",
|
|
||||||
areaTypeName: "",
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
|
|
||||||
}
|
|
||||||
this.$emit('doback')
|
|
||||||
},
|
|
||||||
showAdd() {},
|
|
||||||
showEdit(row) {
|
|
||||||
req.initWarehousearea(row.sid)
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.formobj = resp.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
this.formobj = row
|
|
||||||
})
|
|
||||||
},
|
|
||||||
selectWarehouseChange(val) {
|
|
||||||
const choose = this.warehouseList.filter((item) => item.sid == val)
|
|
||||||
console.log('>>>>>>>>>selectWarehouseChange', choose)
|
|
||||||
this.formobj.warehouseSid = choose[0].sid
|
|
||||||
this.formobj.warehouseName = choose[0].warehouseName
|
|
||||||
},
|
|
||||||
selectWarehouseTypeValueChange(val) {
|
|
||||||
const choose = this.warehouseTypeList.filter((item) => item.sid == val)
|
|
||||||
console.log('>>>>>>>>>selectWarehouseTypeValueChange', choose)
|
|
||||||
this.formobj.areaTypeSid = choose[0].sid
|
|
||||||
this.formobj.areaTypeName = choose[0].warehouseAreaTypeName
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</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,264 +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="warehouseAreaTypeName" label="库区类型名称" align="center" />
|
|
||||||
<el-table-column prop="createTime" 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/warehouseAreaType/warehouseAreaType.js'
|
|
||||||
import ButtonBar from '@/components/ButtonBar'
|
|
||||||
import Pagination from '@/components/pagination'
|
|
||||||
import pageye from '@/components/pagination/pageye'
|
|
||||||
import divAdd from './warehouseAreaTypeAdd.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
|
|
||||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
|
|
||||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
this.queryParams.params.menuUrl = this.$route.path
|
|
||||||
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,174 +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.warehouseAreaTypeName" 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/warehouseAreaType/warehouseAreaType.js'
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
sid: '',
|
|
||||||
warehouseAreaTypeName: '',
|
|
||||||
remarks: '',
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {},
|
|
||||||
methods: {
|
|
||||||
saveOrUpdate() {
|
|
||||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
|
||||||
req.saveWarehousearea(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: '',
|
|
||||||
warehouseAreaTypeName: '',
|
|
||||||
remarks: '',
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
|
|
||||||
}
|
|
||||||
this.$emit('doback')
|
|
||||||
},
|
|
||||||
showAdd() {},
|
|
||||||
showEdit(row) {
|
|
||||||
req.initWarehousearea(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,301 +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" :rules="rules" class="formaddcopy02">
|
|
||||||
|
|
||||||
<el-row class="first_row">
|
|
||||||
<el-col :span="8">
|
|
||||||
|
|
||||||
<div class="span-sty"><span class="must">*</span> 品牌名称</div>
|
|
||||||
<el-form-item prop="brandName">
|
|
||||||
<el-input v-model="formobj.brandName" placeholder="" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 品牌代码</div>
|
|
||||||
<el-form-item prop="brandCode">
|
|
||||||
<el-input v-model="formobj.brandCode" placeholder="" class="addinputw addinputInf" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 首字母大写</div>
|
|
||||||
<el-form-item prop="letter">
|
|
||||||
<el-input v-model="formobj.letter" placeholder="" class="addinputw addinputInf" clearable
|
|
||||||
oninput="value=value.replace(/[^A-Z]/g,'');" @input="letter" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
|
|
||||||
<div class="span-sty"> 品牌备注</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="24">
|
|
||||||
<div class="span-sty">品牌Logo</div>
|
|
||||||
<el-form-item>
|
|
||||||
<upload-img ref="uploadImg" class="addinputw addinputInfo" v-model="imgList" :limit="1" bucket="map"
|
|
||||||
:upload-data="{ type: '0001' }" :class="{ hide: hideUploadBtn }" @change="backData" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<el-card class="box-card">
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text"><span class="must">*</span> 品牌名称:</span>
|
|
||||||
<el-input v-model="formobj.brandName" placeholder="" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text"><span class="must">*</span> 品牌代码:</span>
|
|
||||||
<el-input v-model="formobj.brandCode" placeholder="" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text"><span class="must">*</span> 首字母大写:</span>
|
|
||||||
<el-input v-model="formobj.letter" placeholder="" class="item_input" clearable
|
|
||||||
oninput="value=value.replace(/[^A-Z]/g,'');" @input="letter" />
|
|
||||||
</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">品牌Logo:</span>
|
|
||||||
<upload-img ref="uploadImg" class="item_input" v-model="imgList" :limit="1" bucket="map"
|
|
||||||
:upload-data="{ type: '0001' }" :class="{ hide: hideUploadBtn }" @change="backData" />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-card> -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/goods/brand.js'
|
|
||||||
import uploadImg from '@/components/uploadFile/uploadImg'
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
uploadImg
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
imgList: [],
|
|
||||||
imgList2: [],
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
sid: '',
|
|
||||||
brandName: '',
|
|
||||||
brandCode: '',
|
|
||||||
remarks: '',
|
|
||||||
letter: '',
|
|
||||||
image: "",
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
|
|
||||||
},
|
|
||||||
hideUploadBtn: false,
|
|
||||||
hideUploadBtn2: false,
|
|
||||||
rules: {
|
|
||||||
brandName: [{
|
|
||||||
required: true,
|
|
||||||
message: '品牌名称不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
brandCode: [{
|
|
||||||
required: true,
|
|
||||||
message: '品牌代码不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
letter: [{
|
|
||||||
required: true,
|
|
||||||
message: '首字母大写不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
// this.initData()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
letter(val) {
|
|
||||||
console.log('letter', val)
|
|
||||||
this.formobj.letter = val
|
|
||||||
},
|
|
||||||
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)
|
|
||||||
},
|
|
||||||
|
|
||||||
saveOrUpdate() {
|
|
||||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
|
||||||
|
|
||||||
// if (this.formobj.brandName == '') {
|
|
||||||
// this.$message({
|
|
||||||
// showClose: true,
|
|
||||||
// type: 'warning',
|
|
||||||
// message: "品牌名称不能为空"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.formobj.brandCode == '') {
|
|
||||||
// this.$message({
|
|
||||||
// showClose: true,
|
|
||||||
// type: 'warning',
|
|
||||||
// message: "品牌代码不能为空"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.formobj.letter == '') {
|
|
||||||
// this.$message({
|
|
||||||
// showClose: true,
|
|
||||||
// type: 'warning',
|
|
||||||
// message: "首字母大写不能为空"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
this.$refs['form_obj'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
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.hideUploadBtn = true
|
|
||||||
this.formobj = {
|
|
||||||
sid: '',
|
|
||||||
brandName: '',
|
|
||||||
brandCode: '',
|
|
||||||
remarks: '',
|
|
||||||
letter: '',
|
|
||||||
image: "",
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
}
|
|
||||||
this.$emit('doback')
|
|
||||||
},
|
|
||||||
showAdd() {
|
|
||||||
console.log("this.imgList", this.imgList)
|
|
||||||
this.hideUploadBtn = this.imgList.length != 0
|
|
||||||
},
|
|
||||||
showEdit(row) {
|
|
||||||
req.initBrands(row.sid)
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.formobj = resp.data
|
|
||||||
this.imgList = []
|
|
||||||
if (resp.data.image != '') {
|
|
||||||
this.imgList.push({
|
|
||||||
url: resp.data.image
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
this.hideUploadBtn = this.imgList.length != 0
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
this.formobj = row
|
|
||||||
this.imgList = []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
/deep/ .el-form-item__error {
|
|
||||||
margin-left: 120px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.must {
|
|
||||||
color: #f00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,313 +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%"
|
|
||||||
@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 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 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/goods/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: 'primary',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'edit',
|
|
||||||
btnKey: 'toEdit',
|
|
||||||
btnLabel: '编辑'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'danger',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'plus',
|
|
||||||
btnKey: 'doDel',
|
|
||||||
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: {
|
|
||||||
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 'toAdd':
|
|
||||||
this.toAdd()
|
|
||||||
break
|
|
||||||
case 'toEdit':
|
|
||||||
this.toEdit()
|
|
||||||
break
|
|
||||||
case 'doDel':
|
|
||||||
this.doDel()
|
|
||||||
break
|
|
||||||
case 'doClose':
|
|
||||||
this.doClose()
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadList() {
|
|
||||||
this.tableLoading = true
|
|
||||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
|
|
||||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
this.queryParams.params.menuUrl = this.$route.path
|
|
||||||
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)
|
|
||||||
},
|
|
||||||
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: '请至少选择一条记录进行删除操作'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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,376 +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" :rules="rules" class="formaddcopy02">
|
|
||||||
|
|
||||||
<el-row class="first_row">
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">选择父级类别</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-select v-model="formobj.pname" placeholder="请选择父级类别" class="addinputw addinputInfo"
|
|
||||||
@change="selectGoodsTypeChange">
|
|
||||||
<el-option v-for="item in goodsTypeList" :key="item.sid" :label="item.goodsTypeName"
|
|
||||||
:value="item.sid" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
|
|
||||||
<div class="span-sty"><span class="must">*</span> 类别名称</div>
|
|
||||||
<el-form-item prop="goodsTypeName">
|
|
||||||
<el-input v-model="formobj.goodsTypeName" placeholder="" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 类别编码</div>
|
|
||||||
<el-form-item prop="goodsTypeCode">
|
|
||||||
<el-input v-model="formobj.goodsTypeCode" placeholder="" class="addinputw addinputInfo" clearable
|
|
||||||
oninput="value=value.replace(/[^A-Za-z0-9]/g, '')" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="8">
|
|
||||||
|
|
||||||
<div class="span-sty">提成比例</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.percentageRate" placeholder="" class="addinputw addinputInfo" clearable
|
|
||||||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">提成金额</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.percentageAmount" placeholder="" class="addinputw addinputInfo" clearable
|
|
||||||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 出库规则</div>
|
|
||||||
<el-form-item prop="outStockRuleValue">
|
|
||||||
<el-select v-model="formobj.outStockRuleValue" placeholder="请选择出库规则" class="addinputw addinputInfo"
|
|
||||||
@change="selectOutStockRuleChange">
|
|
||||||
<el-option v-for="item in outStockRuleList" :key="item.dictKey" :label="item.dictValue"
|
|
||||||
:value="item.dictKey" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="8">
|
|
||||||
|
|
||||||
<div class="span-sty"><span class="must">*</span>排序</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.sortNo" placeholder="" class="addinputw addinputInfo" clearable
|
|
||||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="16">
|
|
||||||
|
|
||||||
<div class="span-sty">备注</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <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 class="must">*</span> 类别名称:</span>
|
|
||||||
<el-input v-model="formobj.goodsTypeName" placeholder="" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text"><span class="must">*</span> 类别编码:</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 class="must">*</span> 出库规则:</span>
|
|
||||||
<el-select v-model="formobj.outStockRuleValue" placeholder="请选择出库规则" class="item_input"
|
|
||||||
@change="selectOutStockRuleChange">
|
|
||||||
<el-option v-for="item in outStockRuleList" :key="item.dictKey" :label="item.dictValue"
|
|
||||||
:value="item.dictKey" />
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text"><span class="must">*</span> 类别排序:</span>
|
|
||||||
<el-input v-model="formobj.sortNo" placeholder="" class="item_input" clearable
|
|
||||||
oninput="value=value.replace(/^(0+)|[^\d]+/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/goods/category.js'
|
|
||||||
import {
|
|
||||||
typeValues
|
|
||||||
} from '@/api/Common/dictcommons.js'
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
sid: '',
|
|
||||||
goodsTypeName: '',
|
|
||||||
goodsTypeCode: '',
|
|
||||||
percentageRate: '',
|
|
||||||
percentageAmount: '',
|
|
||||||
outStockRule: '',
|
|
||||||
outStockRuleValue: '',
|
|
||||||
sids: '',
|
|
||||||
pname: '',
|
|
||||||
sortNo: '',
|
|
||||||
remarks: '',
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
|
|
||||||
},
|
|
||||||
goodsTypeList: [],
|
|
||||||
outStockRuleList: [],
|
|
||||||
rules: {
|
|
||||||
goodsTypeName: [{
|
|
||||||
required: true,
|
|
||||||
message: '类别名称不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
goodsTypeCode: [{
|
|
||||||
required: true,
|
|
||||||
message: '类别编码不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
outStockRuleValue: [{
|
|
||||||
required: true,
|
|
||||||
message: '请选择出库规则',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
sortNo: [{
|
|
||||||
required: true,
|
|
||||||
message: '排序不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.initData()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData() {
|
|
||||||
console.log('>>>>>>>>>initData')
|
|
||||||
var parpams = {
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
}
|
|
||||||
|
|
||||||
req.getAllType(parpams).then(resp => {
|
|
||||||
this.goodsTypeList = resp.data
|
|
||||||
})
|
|
||||||
|
|
||||||
var params = {
|
|
||||||
type: "goodsOutRule",
|
|
||||||
psid: '0'
|
|
||||||
}
|
|
||||||
|
|
||||||
typeValues(params).then(resp => {
|
|
||||||
console.log('>>>>>>>>>typeValues', resp)
|
|
||||||
this.outStockRuleList = resp.data
|
|
||||||
}).catch(() => {})
|
|
||||||
|
|
||||||
},
|
|
||||||
saveOrUpdate() {
|
|
||||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
|
||||||
|
|
||||||
// if (this.formobj.goodsTypeName == '') {
|
|
||||||
// this.$message({
|
|
||||||
// showClose: true,
|
|
||||||
// type: 'warning',
|
|
||||||
// message: "类别名称不能为空"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.formobj.goodsTypeCode == '') {
|
|
||||||
// this.$message({
|
|
||||||
// showClose: true,
|
|
||||||
// type: 'warning',
|
|
||||||
// message: "类别编码不能为空"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.formobj.outStockRule == '' || this.formobj.outStockRuleValue == '') {
|
|
||||||
// this.$message({
|
|
||||||
// showClose: true,
|
|
||||||
// type: 'warning',
|
|
||||||
// message: "请选择出库规则"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.formobj.sortNo == '') {
|
|
||||||
// this.$message({
|
|
||||||
// showClose: true,
|
|
||||||
// type: 'warning',
|
|
||||||
// message: "类别排序不能为空"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
this.$refs['form_obj'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
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: '',
|
|
||||||
outStockRule: '',
|
|
||||||
outStockRuleValue: '',
|
|
||||||
sids: '',
|
|
||||||
pname: '',
|
|
||||||
sortNo: '',
|
|
||||||
remarks: '',
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
}
|
|
||||||
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
|
|
||||||
},
|
|
||||||
|
|
||||||
selectOutStockRuleChange(val) {
|
|
||||||
console.log('>>>>>>>>>selectOutStockRuleChange', val)
|
|
||||||
const choose = this.outStockRuleList.filter((item) => item.dictKey == val)
|
|
||||||
console.log('>>>>>>>>>selectOutStockRuleChange', choose)
|
|
||||||
this.formobj.outStockRule = choose[0].dictKey
|
|
||||||
this.formobj.outStockRuleValue = choose[0].dictValue
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
/deep/ .el-form-item__error {
|
|
||||||
margin-left: 120px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.must {
|
|
||||||
color: #f00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,381 +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-item label="类别编码">
|
|
||||||
<el-input v-model="queryParams.params.code" placeholder="" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否一物一码">
|
|
||||||
<el-select v-model="queryParams.params.goodID" placeholder="请选择"
|
|
||||||
@change="selectIsGoodIDChange">
|
|
||||||
<el-option v-for="item in isGoodIDList" :key="item.sid" :label="item.name" :value="item.sid" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="出库规则">
|
|
||||||
<el-select v-model="queryParams.params.outStockRule" placeholder="请选择"
|
|
||||||
@change="selectOutStockRuleChange">
|
|
||||||
<el-option v-for="item in outStockRuleList" :key="item.dictKey" :label="item.dictValue"
|
|
||||||
:value="item.dictKey" />
|
|
||||||
</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 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 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-column prop="outstockRulevalue" 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/goods/category.js'
|
|
||||||
import {
|
|
||||||
typeValues
|
|
||||||
} from '@/api/Common/dictcommons.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: 'primary',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'edit',
|
|
||||||
btnKey: 'toEdit',
|
|
||||||
btnLabel: '编辑'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'danger',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'plus',
|
|
||||||
btnKey: 'doDel',
|
|
||||||
btnLabel: '删除'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'info',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'cross',
|
|
||||||
btnKey: 'doClose',
|
|
||||||
btnLabel: '关闭'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
queryParams: {
|
|
||||||
current: 1,
|
|
||||||
size: 10,
|
|
||||||
total: 0,
|
|
||||||
params: {
|
|
||||||
name: '',
|
|
||||||
code: '',
|
|
||||||
goodID: '',
|
|
||||||
outStockRule: '',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isGoodIDList: [{
|
|
||||||
sid: "0",
|
|
||||||
name: '否'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
sid: "1",
|
|
||||||
name: '是'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
outStockRuleList: [],
|
|
||||||
sids: [],
|
|
||||||
selectionList: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.loadList()
|
|
||||||
this.getDictValue()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getDictValue() {
|
|
||||||
|
|
||||||
var params = {
|
|
||||||
type: "goodsOutRule",
|
|
||||||
psid: '0'
|
|
||||||
}
|
|
||||||
|
|
||||||
typeValues(params).then(resp => {
|
|
||||||
console.log('>>>>>>>>>typeValues', resp)
|
|
||||||
this.outStockRuleList = resp.data
|
|
||||||
}).catch(() => {})
|
|
||||||
},
|
|
||||||
selectIsGoodIDChange(val) {
|
|
||||||
|
|
||||||
},
|
|
||||||
selectOutStockRuleChange(val) {
|
|
||||||
|
|
||||||
},
|
|
||||||
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 'toAdd':
|
|
||||||
this.toAdd()
|
|
||||||
break
|
|
||||||
case 'doDel':
|
|
||||||
this.doDel()
|
|
||||||
break
|
|
||||||
case 'toEdit':
|
|
||||||
this.toEdit()
|
|
||||||
break
|
|
||||||
case 'doClose':
|
|
||||||
this.doClose()
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadList() {
|
|
||||||
this.tableLoading = true
|
|
||||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
|
|
||||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
this.queryParams.params.menuUrl = this.$route.path
|
|
||||||
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: '',
|
|
||||||
code: '',
|
|
||||||
goodID: '',
|
|
||||||
outStockRule: '',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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)
|
|
||||||
},
|
|
||||||
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: '请至少选择一条记录进行删除操作'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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,239 +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" :rules="rules" class="formaddcopy02">
|
|
||||||
|
|
||||||
<el-row class="first_row">
|
|
||||||
<el-col :span="8">
|
|
||||||
|
|
||||||
<div class="span-sty"><span class="must">*</span> 厂家名称</div>
|
|
||||||
<el-form-item prop="manufacturerName">
|
|
||||||
<el-input v-model="formobj.manufacturerName" placeholder="" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="16">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 厂家编码</div>
|
|
||||||
<el-form-item prop="manufacturerCode">
|
|
||||||
<el-input v-model="formobj.manufacturerCode" placeholder="" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row class="first_row">
|
|
||||||
<el-col :span="8">
|
|
||||||
|
|
||||||
<div class="span-sty"><span class="must">*</span> 排序</div>
|
|
||||||
<el-form-item prop="sortNo">
|
|
||||||
<el-input v-model="formobj.sortNo" placeholder="" class="addinputw addinputInfo" clearable
|
|
||||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="16">
|
|
||||||
<div class="span-sty">备注</div>
|
|
||||||
<el-form-item >
|
|
||||||
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <el-card class="box-card">
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text"><span class="must">*</span> 厂家名称:</span>
|
|
||||||
<el-input v-model="formobj.manufacturerName" placeholder="" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text"><span class="must">*</span> 厂家编码:</span>
|
|
||||||
<el-input v-model="formobj.manufacturerCode" placeholder="" class="item_input" clearable />
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text"><span class="must">*</span> 厂家排序:</span>
|
|
||||||
<el-input v-model="formobj.sortNo" placeholder="" class="item_input" clearable
|
|
||||||
oninput="value=value.replace(/^(0+)|[^\d]+/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/goods/factory.js'
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
sid: '',
|
|
||||||
manufacturerName: '',
|
|
||||||
manufacturerCode: '',
|
|
||||||
sortNo: '',
|
|
||||||
remarks: "",
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
manufacturerName: [{
|
|
||||||
required: true,
|
|
||||||
message: '厂家名称不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
manufacturerCode: [{
|
|
||||||
required: true,
|
|
||||||
message: '厂家编码不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
sortNo: [{
|
|
||||||
required: true,
|
|
||||||
message: '排序不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
saveOrUpdate() {
|
|
||||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
|
||||||
|
|
||||||
// if (this.formobj.manufacturerName == '') {
|
|
||||||
// this.$message({
|
|
||||||
// showClose: true,
|
|
||||||
// type: 'warning',
|
|
||||||
// message: "厂家名称不能为空"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.formobj.manufacturerCode == '') {
|
|
||||||
// this.$message({
|
|
||||||
// showClose: true,
|
|
||||||
// type: 'warning',
|
|
||||||
// message: "厂家编码不能为空"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.formobj.sortNo == '') {
|
|
||||||
// this.$message({
|
|
||||||
// showClose: true,
|
|
||||||
// type: 'warning',
|
|
||||||
// message: "厂家排序不能为空"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
this.$refs['form_obj'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
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: "",
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
}
|
|
||||||
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 scoped>
|
|
||||||
/deep/ .el-form-item__error {
|
|
||||||
margin-left: 120px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.must {
|
|
||||||
color: #f00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,302 +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%"
|
|
||||||
@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 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 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/goods/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: 'primary',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'edit',
|
|
||||||
btnKey: 'toEdit',
|
|
||||||
btnLabel: '编辑'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'danger',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'plus',
|
|
||||||
btnKey: 'doDel',
|
|
||||||
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: {
|
|
||||||
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 'toAdd':
|
|
||||||
this.toAdd()
|
|
||||||
break
|
|
||||||
case 'toEdit':
|
|
||||||
this.toEdit()
|
|
||||||
break
|
|
||||||
case 'doDel':
|
|
||||||
this.doDel()
|
|
||||||
break
|
|
||||||
case 'doClose':
|
|
||||||
this.doClose()
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadList() {
|
|
||||||
this.tableLoading = true
|
|
||||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
|
|
||||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
this.queryParams.params.menuUrl = this.$route.path
|
|
||||||
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)
|
|
||||||
},
|
|
||||||
toEdit() {
|
|
||||||
|
|
||||||
if (this.selectionList.length != 1) {
|
|
||||||
this.$message({
|
|
||||||
type: 'warning',
|
|
||||||
message: "请选择一条数据。",
|
|
||||||
showClose: true
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.viewState = 3
|
|
||||||
this.$refs['divadd'].showEdit(this.selectionList[0])
|
|
||||||
},
|
|
||||||
toRelevancy(row) {
|
|
||||||
this.viewState = 3
|
|
||||||
this.$refs['divadd'].showEdit(row)
|
|
||||||
},
|
|
||||||
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: '请至少选择一条记录进行删除操作'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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,509 +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" :rules="rules" class="formaddcopy02">
|
|
||||||
<div class="title">
|
|
||||||
<div>基础信息</div>
|
|
||||||
</div>
|
|
||||||
<el-row class="first_row">
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 商品名称</div>
|
|
||||||
<el-form-item prop="goodsName">
|
|
||||||
<el-input v-model="formobj.goodsName" placeholder="商品名称" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 商品编码</div>
|
|
||||||
<el-form-item prop="goodsCode">
|
|
||||||
<el-input v-model="formobj.goodsCode" placeholder="商品编码" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">条形码</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.barCode" placeholder="由系统自动生成" :readonly="true" class="addinputw addinputInfo"
|
|
||||||
clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty"> 拼音缩写</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.goodsPY" placeholder="由系统自动生成" :readonly="true" class="addinputw addinputInfo"
|
|
||||||
clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 计量单位</div>
|
|
||||||
<el-form-item prop="goodsUnitName">
|
|
||||||
<el-select v-model="formobj.goodsUnitName" placeholder="请选择计量单位" class="addinputw"
|
|
||||||
@change="selectunitNameChange">
|
|
||||||
<el-option v-for="item in unitNameList" :key="item.sid" :label="item.unitName" :value="item.sid" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 商品类别</div>
|
|
||||||
<el-form-item prop="goodsTypeName">
|
|
||||||
<el-select v-model="formobj.goodsTypeName" placeholder="请选择商品类别" class="addinputw"
|
|
||||||
@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-col :span="6">
|
|
||||||
<div class="span-sty">规格</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.indexes" placeholder="规格" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">保质期(天)</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.shelfLife " placeholder="保质期(天)" class="addinputw addinputInfo" clearable
|
|
||||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 品牌</div>
|
|
||||||
<el-form-item prop="brandName">
|
|
||||||
<el-select v-model="formobj.brandName" placeholder="请选择品牌" class="addinputw" @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="12">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 厂家</div>
|
|
||||||
<el-form-item prop="manufacturerName">
|
|
||||||
<el-select v-model="formobj.manufacturerName" placeholder="请选择厂家" class="addinputw"
|
|
||||||
@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="6">
|
|
||||||
<div class="span-sty">原厂标志</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-radio-group v-model="formobj.isOriginalFactory" size="small" class="addinputw"
|
|
||||||
@change="selectIsOriginalFactory">
|
|
||||||
<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="6">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 库存上限</div>
|
|
||||||
<el-form-item prop="inventoryAlertUpperLimit">
|
|
||||||
<el-input v-model="formobj.inventoryAlertUpperLimit" placeholder="库存上限" class="addinputw addinputInfo"
|
|
||||||
clearable oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="18">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 库存下限</div>
|
|
||||||
<el-form-item prop="inventoryAlertLowerLimit">
|
|
||||||
<el-input v-model="formobj.inventoryAlertLowerLimit" placeholder="库存下限" class="addinputw addinputInfo"
|
|
||||||
clearable oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 排序</div>
|
|
||||||
<el-form-item prop="sortNo">
|
|
||||||
<el-input v-model="formobj.sortNo" placeholder="排序" class="addinputw addinputInfo" clearable
|
|
||||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="18">
|
|
||||||
<div class="span-sty">备注</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.skuRemarks" placeholder="备注" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">锁定销售定价</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-radio-group v-model="formobj.isLockingSalesPrice" size="small" class="addinputw"
|
|
||||||
@change="selectIsLockingSalesPrice">
|
|
||||||
<el-radio :label="'1'">是</el-radio>
|
|
||||||
<el-radio :label="'2'">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">销售底价</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.minimumSalesPrice" placeholder="销售底价" class="addinputw addinputInfo" clearable
|
|
||||||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">三包价格</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.standardPurchasePrice" placeholder="三包价格" class="addinputw addinputInfo"
|
|
||||||
clearable
|
|
||||||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">首保价格</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.agencyPrice" placeholder="首保价格" class="addinputw addinputInfo" clearable
|
|
||||||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="24">
|
|
||||||
<div class="span-sty">商品图片</div>
|
|
||||||
<el-form-item>
|
|
||||||
<upload-img ref="uploadImg" class="addinputw addinputInfo" v-model="imgList" :limit="50" bucket="map"
|
|
||||||
:upload-data="{ type: '0001' }" @change="backData" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/goods/goods.js'
|
|
||||||
import req2 from '@/api/goods/brand.js'
|
|
||||||
import req3 from '@/api/goods/category.js'
|
|
||||||
import req4 from '@/api/goods/factory.js'
|
|
||||||
import req5 from '@/api/goods/unit.js'
|
|
||||||
import uploadImg from '@/components/uploadFile/uploadImg'
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
uploadImg
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
listLoading: false,
|
|
||||||
activeNames: ['1'],
|
|
||||||
imgList: [],
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
"sid": "",
|
|
||||||
"userSid": window.sessionStorage.getItem('userSid'),
|
|
||||||
"orgPath": window.sessionStorage.getItem('orgSidPath'),
|
|
||||||
"goodsName": "",
|
|
||||||
"goodsCode": "",
|
|
||||||
"goodsPY": "",
|
|
||||||
"barCode": "",
|
|
||||||
"goodsUnitSid": "",
|
|
||||||
"goodsUnitName": "",
|
|
||||||
"goodsTypeSid": "",
|
|
||||||
"goodsTypeName": "",
|
|
||||||
"indexes": "",
|
|
||||||
"shelfLife": "",
|
|
||||||
"brandSid": "",
|
|
||||||
"brandName": "",
|
|
||||||
"manufacturerSid": "",
|
|
||||||
"manufacturerName": "",
|
|
||||||
"isOriginalFactory": "2",
|
|
||||||
"isOriginalFactoryValue": "",
|
|
||||||
"sortNo": "",
|
|
||||||
"skuRemarks": "",
|
|
||||||
"inventoryAlertUpperLimit": "",
|
|
||||||
"inventoryAlertLowerLimit": "",
|
|
||||||
"isLockingSalesPrice": "2",
|
|
||||||
"isLockingSalesPriceValue": "",
|
|
||||||
"minimumSalesPrice": "",
|
|
||||||
"standardPurchasePrice": "",
|
|
||||||
"agencyPrice": "",
|
|
||||||
"picPath": []
|
|
||||||
},
|
|
||||||
brandList: [],
|
|
||||||
cateList: [],
|
|
||||||
facturerList: [],
|
|
||||||
unitNameList: [],
|
|
||||||
rules: {
|
|
||||||
goodsName: [{
|
|
||||||
required: true,
|
|
||||||
message: '商品名称不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
goodsCode: [{
|
|
||||||
required: true,
|
|
||||||
message: '商品编码不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
goodsUnitName: [{
|
|
||||||
required: true,
|
|
||||||
message: '请选择计量单位',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
goodsTypeName: [{
|
|
||||||
required: true,
|
|
||||||
message: '请选择商品类别',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
brandName: [{
|
|
||||||
required: true,
|
|
||||||
message: '请选择商品品牌',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
manufacturerName: [{
|
|
||||||
required: true,
|
|
||||||
message: '请选择商品厂家',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
sortNo: [{
|
|
||||||
required: true,
|
|
||||||
message: '商品排序不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
inventoryAlertUpperLimit: [{
|
|
||||||
required: true,
|
|
||||||
message: '商品上限不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
inventoryAlertLowerLimitt: [{
|
|
||||||
required: true,
|
|
||||||
message: '商品下限不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.initData()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
selectIsOriginalFactory(val) {
|
|
||||||
console.log('selectIsOriginalFactory》》》》', val)
|
|
||||||
|
|
||||||
this.formobj.isOriginalFactoryValue = val == '1' ? '是' : '否'
|
|
||||||
|
|
||||||
},
|
|
||||||
selectIsLockingSalesPrice(val) {
|
|
||||||
console.log('selectIsLockingSalesPrice》》》》', val)
|
|
||||||
|
|
||||||
this.formobj.isLockingSalesPriceValue = val == '1' ? '是' : '否'
|
|
||||||
|
|
||||||
},
|
|
||||||
initData() {
|
|
||||||
var parpams = {
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
}
|
|
||||||
req2.getAllBrand(parpams).then(resp => {
|
|
||||||
this.brandList = resp.data
|
|
||||||
})
|
|
||||||
req3.getAllType(parpams).then(resp => {
|
|
||||||
this.cateList = resp.data
|
|
||||||
})
|
|
||||||
req4.getAllFacturer(parpams).then(resp => {
|
|
||||||
this.facturerList = resp.data
|
|
||||||
})
|
|
||||||
req5.getAllUnit(parpams).then(resp => {
|
|
||||||
this.unitNameList = resp.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
backData(value) {
|
|
||||||
console.log('backData》》》》', value)
|
|
||||||
console.log('imgList', this.imgList)
|
|
||||||
|
|
||||||
this.formobj.picPath = this.imgList
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
saveOrUpdate() {
|
|
||||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
|
||||||
this.$refs['form_obj'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
|
|
||||||
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.formobj = {
|
|
||||||
"sid": "",
|
|
||||||
"userSid": window.sessionStorage.getItem('userSid'),
|
|
||||||
"orgPath": window.sessionStorage.getItem('orgSidPath'),
|
|
||||||
"goodsName": "",
|
|
||||||
"goodsCode": "",
|
|
||||||
"goodsPY": "",
|
|
||||||
"barCode": "",
|
|
||||||
"goodsUnitSid": "",
|
|
||||||
"goodsUnitName": "",
|
|
||||||
"goodsTypeSid": "",
|
|
||||||
"goodsTypeName": "",
|
|
||||||
"indexes": "",
|
|
||||||
"shelfLife": "",
|
|
||||||
"brandSid": "",
|
|
||||||
"brandName": "",
|
|
||||||
"manufacturerSid": "",
|
|
||||||
"manufacturerName": "",
|
|
||||||
"isOriginalFactory": "2",
|
|
||||||
"isOriginalFactoryValue": "",
|
|
||||||
"sortNo": "",
|
|
||||||
"skuRemarks": "",
|
|
||||||
"inventoryAlertUpperLimit": "",
|
|
||||||
"inventoryAlertLowerLimit": "",
|
|
||||||
"isLockingSalesPrice": "2",
|
|
||||||
"isLockingSalesPriceValue": "",
|
|
||||||
"minimumSalesPrice": "",
|
|
||||||
"standardPurchasePrice": "",
|
|
||||||
"agencyPrice": "",
|
|
||||||
"picPath": []
|
|
||||||
}
|
|
||||||
this.$emit('doback')
|
|
||||||
},
|
|
||||||
showAdd() {
|
|
||||||
// var sid = require('uuid').v1()
|
|
||||||
// console.log('>>>>>>>>>showAdd', sid)
|
|
||||||
|
|
||||||
// this.formobj.sid = sid
|
|
||||||
},
|
|
||||||
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.goodsTypeName = 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
|
|
||||||
},
|
|
||||||
selectunitNameChange(val) {
|
|
||||||
const choose = this.unitNameList.filter((item) => item.sid == val)
|
|
||||||
console.log('>>>>>>>>>selectunitNameChange', choose)
|
|
||||||
this.formobj.goodsUnitSid = choose[0].sid
|
|
||||||
this.formobj.goodsUnitName = choose[0].unitName
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
/deep/ .el-form-item__error {
|
|
||||||
margin-left: 120px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.must {
|
|
||||||
color: #f00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,585 +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" class="formaddcopy02">
|
|
||||||
<div class="title">
|
|
||||||
<div>基础信息</div>
|
|
||||||
</div>
|
|
||||||
<el-row class="first_row">
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">商品名称</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.goodsName}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">商品简称</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.goodsShortName}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">商品副标题</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.subTitle}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<!-- <el-row>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-row> -->
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">商品拼音缩写</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.goodsPY}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">商品编码</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.goodsCode}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">商品条形码</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.barCode}}</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.brandName}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">商品类别</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.typeName}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">商品单位</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.goodsUnitName}}</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.manufacturerName}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">厂家货号</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.factoryCode}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">是否上架</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-radio-group v-model="formobj.isListed" :disabled="true" size="small" class="addinputw">
|
|
||||||
<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-row> -->
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">外部编码</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.externalCode}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">国标码</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.nationalStandardCode}}</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-row> -->
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">保质期天</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.shelfLife}}</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">
|
|
||||||
<div class="span-sty">商品备注</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.remarks}}</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.baseGoodsSpuDetail.goodsExplain}}</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.baseGoodsSpuDetail.goodsDescription}}</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.baseGoodsSpuDetail.genericSpec}}</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.baseGoodsSpuDetail.specialSpec}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="title titleOne">
|
|
||||||
<div>规格列表</div>
|
|
||||||
</div>
|
|
||||||
<el-table v-loading="listLoading" :data="formobj.baseGoodsSkus" border>
|
|
||||||
<!-- <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="规格代码" prop="goodsSkuCode" align="center" />
|
|
||||||
<el-table-column label="商品标题" prop="title" align="center" />
|
|
||||||
<el-table-column label="外部编码" prop="externalCode" align="center" />
|
|
||||||
<el-table-column label="特有规格属性" prop="indexes" align="center" />
|
|
||||||
<el-table-column label="特有规格参数" prop="ownSpec" 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>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-dialog title="查看规格明细" :visible.sync="dialogVisible" :before-close="handleClose">
|
|
||||||
|
|
||||||
<el-form ref="dataForm1" class="formaddcopy02" style="margin-top: -40px;" :model="itemInfo">
|
|
||||||
|
|
||||||
<el-row class="first_row">
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">最后采购价</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{itemInfo.finalPurchasePrice}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">安全库存天数</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{itemInfo.safetyStockDays}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">是否原厂</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-radio-group v-model="itemInfo.isOriginalFactory" :disabled="true" size="small" class="addinputw">
|
|
||||||
<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">
|
|
||||||
<div class="span-sty">是否库存警戒</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-radio-group v-model="itemInfo.isInventoryAlert" :disabled="true" size="small" class="addinputw">
|
|
||||||
<el-radio :label="'1'">是</el-radio>
|
|
||||||
<el-radio :label="'2'">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">库存警戒上线</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{itemInfo.inventoryAlertUpperLimit}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">库存警戒下线</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{itemInfo.inventoryAlertLowerLimit}}</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">{{itemInfo.costPrice}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">吊牌价</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{itemInfo.tagPrice}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">销售单价</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{itemInfo.salesPrice}}</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">{{itemInfo.standardPurchasePrice}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">代理价</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{itemInfo.agencyPrice}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">折扣</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{itemInfo.discount}}</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">{{itemInfo.minimumSalesPrice}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">是否积分兑换</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-radio-group v-model="itemInfo.isIntegralExchange" :disabled="true" size="small" class="addinputw">
|
|
||||||
<el-radio :label="'1'">是</el-radio>
|
|
||||||
<el-radio :label="'2'">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">积分数量</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{itemInfo.integralAmount}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">锁定销售价格</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-radio-group v-model="itemInfo.isLockingSalesPrice" :disabled="true" size="small" class="addinputw">
|
|
||||||
<el-radio :label="'1'">是</el-radio>
|
|
||||||
<el-radio :label="'2'">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">排序</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{itemInfo.sortNo}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">备注</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{itemInfo.remarks}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<div class="span-sty">规格图片</div>
|
|
||||||
<el-form-item>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span v-for="(item,index) in itemInfo.urls" :key="index" class="addinputInfo">
|
|
||||||
<el-popover placement="left" trigger="click" width="300">
|
|
||||||
<img :src="item.url" width="100%" />
|
|
||||||
<img slot="reference" :src="item.url" :alt="item.url"
|
|
||||||
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>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/goods/goods.js'
|
|
||||||
export default {
|
|
||||||
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: []
|
|
||||||
},
|
|
||||||
hideUploadBtn: false,
|
|
||||||
dialogVisible: false,
|
|
||||||
dialogVisible2: false,
|
|
||||||
itemInfo: {},
|
|
||||||
orderInfo: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
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
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
showGoodsSkuDttail(goodsSkuDto) {
|
|
||||||
console.log('>>>>>>>>>showGoodsSkuDttail', goodsSkuDto)
|
|
||||||
|
|
||||||
this.dialogVisible = true
|
|
||||||
this.itemInfo = goodsSkuDto
|
|
||||||
},
|
|
||||||
|
|
||||||
handleClose() {
|
|
||||||
this.dialogVisible = false
|
|
||||||
},
|
|
||||||
handleClose2() {
|
|
||||||
this.dialogVisible2 = false
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,270 +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" class="formaddcopy02">
|
|
||||||
<div class="title">
|
|
||||||
<div>基础信息</div>
|
|
||||||
</div>
|
|
||||||
<el-row class="first_row">
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">商品名称</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.goodsName}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">商品编码</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.goodsCode}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">商品条形码</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.barCode}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">商品拼音缩写</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.goodsPY}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">商品单位</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.goodsUnitName}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">商品类别</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.goodsTypeName}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">规格</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.indexes}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">保质期(天)</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.shelfLife}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">商品品牌</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.brandName}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<div class="span-sty">商品厂家</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.manufacturerName}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">原厂标志</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-radio-group v-model="formobj.isOriginalFactory" :disabled="true" size="small" class="addinputw">
|
|
||||||
<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="6">
|
|
||||||
<div class="span-sty">商品排序</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.sortNo}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="18">
|
|
||||||
<div class="span-sty">商品备注</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.skuRemarks}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="16">
|
|
||||||
<div class="span-sty">库存上限</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.inventoryAlertUpperLimit}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="18">
|
|
||||||
<div class="span-sty">库存下限</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.inventoryAlertLowerLimit}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">锁定销售定价</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-radio-group v-model="formobj.isLockingSalesPrice" :disabled="true" size="small" class="addinputw">
|
|
||||||
<el-radio :label="'1'">是</el-radio>
|
|
||||||
<el-radio :label="'2'">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">销售底价</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.minimumSalesPrice}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">三包价格</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.standardPurchasePrice}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="span-sty">首保价格</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputInfo">{{formobj.agencyPrice}}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="24">
|
|
||||||
<div class="span-sty">规格图片</div>
|
|
||||||
<el-form-item>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span v-for="(item,index) in formobj.picPath" :key="index" class="addinputInfo">
|
|
||||||
<el-popover placement="left" trigger="click" width="300">
|
|
||||||
<img :src="item.url" width="100%" />
|
|
||||||
<img slot="reference" :src="item.url" :alt="item.url"
|
|
||||||
style="max-height: 70px;max-width: 70px; padding: 5px" />
|
|
||||||
</el-popover>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/goods/goods.js'
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
formobj: {},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
handleReturn(isreload) {
|
|
||||||
if (isreload === 'true') this.$emit('reloadlist')
|
|
||||||
this.formobj = {}
|
|
||||||
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
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,443 +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" @doback="resetState" @reloadlist="loadList" />
|
|
||||||
|
|
||||||
<!-- 导入 -->
|
|
||||||
<el-dialog :visible.sync="dialogVisible" width="60%" :show-close="false">
|
|
||||||
<div style="margin-top: -40px;">
|
|
||||||
<el-button size="medium" type="text" style="font-weight: bold" @click="downLoad">下载商品导入明细模板</el-button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div style="margin-top: 10px;font-weight: bold">导入的EXCEL中的抬头的顺序和名字请保持一致!否则导入数据不正确。</div>
|
|
||||||
<div style="margin-top: 5px;font-weight: bold">导入之前,请仔细检查数据中不能存在"\这些特殊字符。</div>
|
|
||||||
<div style="margin-top: 5px;font-weight: bold">只能导入xls或者xlsx文件,如果导入内容较多,请耐心等待响应。</div>
|
|
||||||
<el-card class="box-card" style="margin-top: 10px;">
|
|
||||||
<div>
|
|
||||||
<el-upload ref="upload" class="upload-demo" accept=".xls,.xlsx" name="file" :action="updateAction"
|
|
||||||
:on-success="handleSuccess" :file-list="fileList" :auto-upload="false" :multiple="false" :limit="1"
|
|
||||||
:data="uploadData" :headers="headers">
|
|
||||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
||||||
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button>
|
|
||||||
</el-upload>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h3>文件上传结果</h3>
|
|
||||||
<el-card class="box-card">
|
|
||||||
<div>{{ uploadResultMesssage }}</div>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
|
||||||
<el-button type="primary" size="small" @click="handleConfirm">确定</el-button>
|
|
||||||
<el-button size="small" @click="dialogVisible = false">取消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/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 {
|
|
||||||
dialogVisible: false,
|
|
||||||
btndisabled: false,
|
|
||||||
updateAction: process.env.VUE_APP_BASE_API + '/wms/apiadmin/base/basegoodsspu/importExcel',
|
|
||||||
fileList: [],
|
|
||||||
uploadSuccess: false,
|
|
||||||
uploadResultMesssage: '',
|
|
||||||
uploadData: {
|
|
||||||
sid: ''
|
|
||||||
},
|
|
||||||
headers: {
|
|
||||||
token: window.sessionStorage.getItem('token')
|
|
||||||
},
|
|
||||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
|
||||||
isSearchShow: false,
|
|
||||||
searchxianshitit: '显示查询条件',
|
|
||||||
tableLoading: false,
|
|
||||||
dataList: [],
|
|
||||||
btnList: [{
|
|
||||||
type: 'success',
|
|
||||||
size: 'small',
|
|
||||||
icon: '',
|
|
||||||
btnKey: 'doImport',
|
|
||||||
btnLabel: '导入商品'
|
|
||||||
}, {
|
|
||||||
type: 'primary',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'plus',
|
|
||||||
btnKey: 'toAdd',
|
|
||||||
btnLabel: '新增'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'primary',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'edit',
|
|
||||||
btnKey: 'toEdit',
|
|
||||||
btnLabel: '编辑'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'danger',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'plus',
|
|
||||||
btnKey: 'doDel',
|
|
||||||
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: {
|
|
||||||
downLoad() {
|
|
||||||
const loading = this.$loading({
|
|
||||||
lock: true,
|
|
||||||
text: 'Loading',
|
|
||||||
spinner: 'el-icon-loading',
|
|
||||||
background: 'rgba(0, 0, 0, 0.7)'
|
|
||||||
})
|
|
||||||
req.downloadExcel().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()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
submitUpload() {
|
|
||||||
this.$refs.upload.submit()
|
|
||||||
},
|
|
||||||
handleSuccess(resp, file, fileList) {
|
|
||||||
const _this = this
|
|
||||||
_this.uploadResultMesssage = resp.msg
|
|
||||||
_this.uploadSuccess = resp.success
|
|
||||||
|
|
||||||
},
|
|
||||||
handleConfirm() {
|
|
||||||
if (!this.uploadSuccess) {
|
|
||||||
this.$message({
|
|
||||||
showClose: true,
|
|
||||||
type: 'error',
|
|
||||||
message: '请先上传商品导入明细'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.dialogVisible = false
|
|
||||||
this.loadList()
|
|
||||||
},
|
|
||||||
// 搜索条件效果
|
|
||||||
clicksearchShow() {
|
|
||||||
this.isSearchShow = !this.isSearchShow
|
|
||||||
if (this.isSearchShow) {
|
|
||||||
this.searchxianshitit = '隐藏查询条件'
|
|
||||||
} else {
|
|
||||||
this.searchxianshitit = '显示查询条件'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
btnHandle(btnKey) {
|
|
||||||
switch (btnKey) {
|
|
||||||
case "doImport":
|
|
||||||
this.doImport()
|
|
||||||
break
|
|
||||||
case 'toAdd':
|
|
||||||
this.toAdd()
|
|
||||||
break
|
|
||||||
case 'toEdit':
|
|
||||||
this.toEdit()
|
|
||||||
break
|
|
||||||
case 'doDel':
|
|
||||||
this.doDel()
|
|
||||||
break
|
|
||||||
case 'doClose':
|
|
||||||
this.doClose()
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selectionLineChangeHandle(val) {
|
|
||||||
console.log("val", val);
|
|
||||||
|
|
||||||
this.selectionList = val
|
|
||||||
const aa = []
|
|
||||||
val.forEach(element => {
|
|
||||||
aa.push(element.sid)
|
|
||||||
})
|
|
||||||
this.sids = aa
|
|
||||||
},
|
|
||||||
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()
|
|
||||||
},
|
|
||||||
doImport() {
|
|
||||||
this.dialogVisible = true
|
|
||||||
},
|
|
||||||
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])
|
|
||||||
},
|
|
||||||
|
|
||||||
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: '请至少选择一条记录进行删除操作'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
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,302 +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%"
|
|
||||||
@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 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 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/goods/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: 'primary',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'edit',
|
|
||||||
btnKey: 'toEdit',
|
|
||||||
btnLabel: '编辑'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'danger',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'plus',
|
|
||||||
btnKey: 'doDel',
|
|
||||||
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: {
|
|
||||||
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 'toAdd':
|
|
||||||
this.toAdd()
|
|
||||||
break
|
|
||||||
case 'toEdit':
|
|
||||||
this.toEdit()
|
|
||||||
break
|
|
||||||
case 'doDel':
|
|
||||||
this.doDel()
|
|
||||||
break
|
|
||||||
case 'doClose':
|
|
||||||
this.doClose()
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadList() {
|
|
||||||
this.tableLoading = true
|
|
||||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
|
|
||||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
this.queryParams.params.menuUrl = this.$route.path
|
|
||||||
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)
|
|
||||||
},
|
|
||||||
toEdit() {
|
|
||||||
|
|
||||||
if (this.selectionList.length != 1) {
|
|
||||||
this.$message({
|
|
||||||
type: 'warning',
|
|
||||||
message: "请选择一条数据。",
|
|
||||||
showClose: true
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.viewState = 3
|
|
||||||
this.$refs['divadd'].showEdit(this.selectionList[0])
|
|
||||||
},
|
|
||||||
toRelevancy(row) {
|
|
||||||
this.viewState = 3
|
|
||||||
this.$refs['divadd'].showEdit(row)
|
|
||||||
},
|
|
||||||
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: '请至少选择一条记录进行删除操作'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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,178 +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" :rules="rules" class="formaddcopy02">
|
|
||||||
|
|
||||||
<el-row class="first_row">
|
|
||||||
<el-col :span="8">
|
|
||||||
|
|
||||||
<div class="span-sty"><span class="must">*</span> 计量单位名称</div>
|
|
||||||
<el-form-item prop="unitName">
|
|
||||||
<el-input v-model="formobj.unitName" placeholder="" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="16">
|
|
||||||
<div class="span-sty">备注</div>
|
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<!-- <el-card class="box-card">
|
|
||||||
<div class="item">
|
|
||||||
<span class="item_text"><span class="must">*</span> 计量单位名称:</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>
|
|
||||||
</el-card> -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/goods/unit.js'
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
sid: '',
|
|
||||||
unitName: '',
|
|
||||||
remarks: '',
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
unitName: [{
|
|
||||||
required: true,
|
|
||||||
message: '计量单位名称不能为空',
|
|
||||||
trigger: 'blur'
|
|
||||||
}],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
// this.initData()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
saveOrUpdate() {
|
|
||||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
|
||||||
|
|
||||||
// if (this.formobj.unitName == '') {
|
|
||||||
// this.$message({
|
|
||||||
// showClose: true,
|
|
||||||
// type: 'warning',
|
|
||||||
// message: "计量单位名称不能为空"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
this.$refs['form_obj'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
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: '',
|
|
||||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid'),
|
|
||||||
}
|
|
||||||
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 scoped>
|
|
||||||
/deep/ .el-form-item__error {
|
|
||||||
margin-left: 120px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.must {
|
|
||||||
color: #f00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</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.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="item.sid" :label="item.name" :value="item.name">
|
|
||||||
</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="item.sid" :label="item.name" :value="item.name">
|
|
||||||
</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="item.sid" :label="item.name" :value="item.name">
|
|
||||||
</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="220" />
|
|
||||||
<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="180" />
|
|
||||||
<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/inStorage/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: "采购预约",
|
|
||||||
sid: "0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "调拨预约",
|
|
||||||
sid: "1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "其他预约",
|
|
||||||
sid: "2"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
billStateList: [{
|
|
||||||
name: "在途",
|
|
||||||
sid: "0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "部分收货",
|
|
||||||
sid: "1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "已收货",
|
|
||||||
sid: "2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "已取消",
|
|
||||||
sid: "3"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
reviewStatusList: [{
|
|
||||||
name: "待审核",
|
|
||||||
sid: "1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "审核通过",
|
|
||||||
sid: "2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "审核拒绝",
|
|
||||||
sid: "3"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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
|
|
||||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
|
|
||||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
this.queryParams.params.menuUrl = this.$route.path
|
|
||||||
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,746 +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" :rules="rules" class="formaddcopy02">
|
|
||||||
<!-- <div class="title">
|
|
||||||
<div>基础信息</div>
|
|
||||||
</div> -->
|
|
||||||
<el-row class="first_row">
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">制单人</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">制单部门</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<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="8">
|
|
||||||
<div class="span-sty">采购单号</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">业务类型</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.busTypeValue }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">供应商</div>
|
|
||||||
<el-select v-model="formobj.supplierName" placeholder="请选择" clearable @change="selectSupplierName"
|
|
||||||
class="addinputInfo">
|
|
||||||
<el-option v-for="(item,i) in supplierNameList" :key="item.sid" :label="item.supplierName"
|
|
||||||
:value="item.sid">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
|
|
||||||
<!-- <el-form-item><span class="addinputInfo">{{ formobj.supplierName }}</span></el-form-item> -->
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 到货日期</div>
|
|
||||||
<el-form-item prop="deliveryDate">
|
|
||||||
<el-date-picker v-model="formobj.deliveryDate" type="date" class="addinputInfo" value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="16">
|
|
||||||
<div class="span-sty">单据状态</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.billState }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<div class="span-sty">备注</div>
|
|
||||||
<el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo"
|
|
||||||
type="textarea" :rows="4" clearable /></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<div class="title titleOne">
|
|
||||||
<div>商品列表</div>
|
|
||||||
<el-button type="primary" size="mini" class="btntopblueline" @click="batchAddAll()">批次收货</el-button>
|
|
||||||
</div>
|
|
||||||
<el-table v-loading="listLoading" :data="formobj.list" 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 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">
|
|
||||||
<div>商品-批次</div>
|
|
||||||
</div>
|
|
||||||
<el-table v-loading="listLoading" :data="formobj.pcList" border style="width: 100%;">
|
|
||||||
<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" 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/inStorage/deliveryNotice.js'
|
|
||||||
import {
|
|
||||||
getCurrentDate
|
|
||||||
} from '@/utils/index.js'
|
|
||||||
import {
|
|
||||||
choiceSupplierInfo,
|
|
||||||
getOrgSidByPath,
|
|
||||||
getWarehouses,
|
|
||||||
getWarehouseareas
|
|
||||||
} from '@/api/Common/dictcommons'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
listLoading: false,
|
|
||||||
activeNames: ['1'],
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
sourceBillNo: "",
|
|
||||||
busTypeKey: "",
|
|
||||||
busTypeValue: "",
|
|
||||||
createTime: '',
|
|
||||||
createByName: window.sessionStorage.getItem('name'),
|
|
||||||
deptName: '',
|
|
||||||
deptSid: '',
|
|
||||||
createBySid: window.sessionStorage.getItem('userSid'),
|
|
||||||
useOrgSid: '',
|
|
||||||
createOrgSid: '',
|
|
||||||
billState: '新建',
|
|
||||||
billStateKey: 0,
|
|
||||||
reviewStatus: "",
|
|
||||||
refuseReason: "",
|
|
||||||
contact: "",
|
|
||||||
mobile: "",
|
|
||||||
supplierSid: "",
|
|
||||||
supplierName: "",
|
|
||||||
goodsOwnerSid: "",
|
|
||||||
goodsOwner: "",
|
|
||||||
deliveryDate: getCurrentDate(),
|
|
||||||
list: [],
|
|
||||||
pcList: []
|
|
||||||
},
|
|
||||||
hideUploadBtn: false,
|
|
||||||
warehouseList: [],
|
|
||||||
warehouseRackList: [],
|
|
||||||
supplierNameList: [],
|
|
||||||
rules: {
|
|
||||||
deliveryDate: [{
|
|
||||||
required: true,
|
|
||||||
message: '到货日期不能为空',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// getOrgPathSid() {
|
|
||||||
// getOrgSidByPath({
|
|
||||||
// orgPath: window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
// }).then((res) => {
|
|
||||||
// if (res.success) {
|
|
||||||
// this.formobj.createOrgSid = res.data
|
|
||||||
// this.formobj.useOrgSid = res.data
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
|
|
||||||
init() {
|
|
||||||
getOrgSidByPath({
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.formobj.createOrgSid = res.data
|
|
||||||
this.formobj.useOrgSid = res.data
|
|
||||||
|
|
||||||
this.getsupplierLust()
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
selectSupplierName(val) {
|
|
||||||
|
|
||||||
console.log("supplierNameSelect", val);
|
|
||||||
const choose = this.supplierNameList.filter((item) => item.sid == val)
|
|
||||||
console.log('>>>>>>>>>supplierNameSelect', choose)
|
|
||||||
this.formobj.supplierName = choose[0].supplierName
|
|
||||||
this.formobj.supplierSid = choose[0].sid
|
|
||||||
|
|
||||||
},
|
|
||||||
getsupplierLust() {
|
|
||||||
|
|
||||||
// getOrgSidByPath({
|
|
||||||
// orgPath: window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
// }).then((res) => {
|
|
||||||
// if (res.success) {
|
|
||||||
// this.formobj.createOrgSid = res.data
|
|
||||||
// this.formobj.useOrgSid = res.data
|
|
||||||
// req.choiceSupplierInfo(res.data).then((resp) => {
|
|
||||||
// if (resp.success) {
|
|
||||||
// this.supplierNameList = resp.data
|
|
||||||
// console.log("aaaaaa", this.supplierNameList);
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
|
|
||||||
choiceSupplierInfo({
|
|
||||||
createOrgSid: this.formobj.createOrgSid
|
|
||||||
}).then((resp) => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.supplierNameList = resp.data
|
|
||||||
console.log("aaaaaa", this.supplierNameList);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
getWarehouseList() {
|
|
||||||
var parpams = {
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
}
|
|
||||||
getWarehouses(parpams).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.warehouseList = res.data
|
|
||||||
|
|
||||||
console.log("aaaaaa", this.warehouseList);
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getWarehouseAreaList(sid) {
|
|
||||||
var query = {
|
|
||||||
ckSid: sid
|
|
||||||
}
|
|
||||||
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].xh === (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: '',
|
|
||||||
expirationDate: '',
|
|
||||||
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 = val
|
|
||||||
// }
|
|
||||||
|
|
||||||
row.amount = (Number(row.actualInCount) * Number(row.cost)).toFixed(2)
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
commodityComputeYHAndXSJE2(row, val) {
|
|
||||||
console.log("aaa", row);
|
|
||||||
console.log("aaa", val);
|
|
||||||
row.rejectCount = 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
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
|
|
||||||
// if (this.formobj.deliveryDate == '') {
|
|
||||||
// this.$message({
|
|
||||||
// showClose: true,
|
|
||||||
// type: 'error',
|
|
||||||
// message: '到货日期不能为空'
|
|
||||||
// })
|
|
||||||
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
for (var i = 0; i < this.formobj.list.length; i++) {
|
|
||||||
|
|
||||||
if (Number(this.formobj.list[i].actualInCount) == 0) {
|
|
||||||
this.$message({
|
|
||||||
showClose: true,
|
|
||||||
type: 'error',
|
|
||||||
message: '商品实收数量不能为空'
|
|
||||||
})
|
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0; i < this.formobj.pcList.length; i++) {
|
|
||||||
|
|
||||||
if (this.formobj.pcList[i].expirationDate == '') {
|
|
||||||
this.$message({
|
|
||||||
showClose: true,
|
|
||||||
type: 'error',
|
|
||||||
message: '生产日期不能为空'
|
|
||||||
})
|
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Number(this.formobj.pcList[i].batchCount) == 0) {
|
|
||||||
this.$message({
|
|
||||||
showClose: true,
|
|
||||||
type: 'error',
|
|
||||||
message: '批次数量不能为0'
|
|
||||||
})
|
|
||||||
|
|
||||||
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.submitdisabled = false
|
|
||||||
this.formobj = {
|
|
||||||
sourceBillNo: "",
|
|
||||||
busTypeKey: "",
|
|
||||||
busTypeValue: "",
|
|
||||||
createByName: "",
|
|
||||||
billState: 0,
|
|
||||||
reviewStatus: "",
|
|
||||||
refuseReason: "",
|
|
||||||
contact: "",
|
|
||||||
mobile: "",
|
|
||||||
supplierSid: "",
|
|
||||||
supplierName: "",
|
|
||||||
goodsOwnerSid: "",
|
|
||||||
goodsOwner: "",
|
|
||||||
deliveryDate: "",
|
|
||||||
list: [],
|
|
||||||
pcList: []
|
|
||||||
}
|
|
||||||
this.$emit('doback')
|
|
||||||
},
|
|
||||||
|
|
||||||
showAdd() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['form_obj'].clearValidate()
|
|
||||||
})
|
|
||||||
|
|
||||||
this.init()
|
|
||||||
|
|
||||||
},
|
|
||||||
showEdit(row) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['form_obj'].clearValidate()
|
|
||||||
})
|
|
||||||
this.init()
|
|
||||||
// this.getWarehouseList()
|
|
||||||
|
|
||||||
// this.getOrgPathSid()
|
|
||||||
var params = {
|
|
||||||
sourceSid: row.sid
|
|
||||||
}
|
|
||||||
|
|
||||||
req.getInitDetails(row.sid)
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.formobj = resp.data
|
|
||||||
this.formobj.deliveryDate = getCurrentDate()
|
|
||||||
|
|
||||||
// this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window
|
|
||||||
// .sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
|
|
||||||
// this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
|
|
||||||
// .getItem('defaultOrgPath').lastIndexOf('/') + 1)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
this.formobj = {}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
/deep/ .el-form-item__error {
|
|
||||||
margin-left: 120px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.must {
|
|
||||||
color: #f00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,175 +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" class="formaddcopy02">
|
|
||||||
<!-- <div class="title">
|
|
||||||
<div>基础信息</div>
|
|
||||||
</div> -->
|
|
||||||
<el-row class="first_row">
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">单据编号</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">制单人</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<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="8">
|
|
||||||
<div class="span-sty">采购单号</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">业务类型</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.busTypeValue }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">供应商</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.supplierName }}</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.deliveryDate }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">单据状态</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.billState }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">审核状态</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.reviewStatus }}</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.refuseReason }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<div class="title titleOne">
|
|
||||||
<div>商品列表</div>
|
|
||||||
</div>
|
|
||||||
<el-table v-loading="listLoading" :data="formobj.list" border style="width: 100%;">
|
|
||||||
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
|
|
||||||
<el-table-column fixed label="商品名称" prop="goodsSkuTitle" align="center" />
|
|
||||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
|
|
||||||
<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" />
|
|
||||||
<el-table-column label="已收货数量" prop="actualInCount" align="center" />
|
|
||||||
<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" />
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/inStorage/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(row.sid)
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.formobj = resp.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
this.formobj = {}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,433 +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="item.dictKey" :label="item.dictValue" :value="item.dictKey">
|
|
||||||
</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" width="220" 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="预期到货通知单号" width="220"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/inStorage/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'
|
|
||||||
import {
|
|
||||||
getTypeValueList
|
|
||||||
} from '@/api/Common/dictcommons'
|
|
||||||
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: [
|
|
||||||
],
|
|
||||||
billStateList: [{
|
|
||||||
name: "新建",
|
|
||||||
sid: "0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "已完成",
|
|
||||||
sid: "1"
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.loadList()
|
|
||||||
|
|
||||||
getTypeValueList({ type: 'wms_busType', groupNum: 'wms_rk' }).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.busTypeList = res.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
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
|
|
||||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
|
|
||||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
this.queryParams.params.menuUrl = this.$route.path
|
|
||||||
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,206 +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" class="formaddcopy02">
|
|
||||||
<!-- <div class="title">
|
|
||||||
<div>基础信息</div>
|
|
||||||
</div> -->
|
|
||||||
<el-row class="first_row">
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">制单人</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">制单部门</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<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="8">
|
|
||||||
<div class="span-sty">来源单号</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">业务类型</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.busTypeValue }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">供应商</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.supplierName }}</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.deliveryDate }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="16">
|
|
||||||
<div class="span-sty">单据状态</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.billState }}</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 titleOne">
|
|
||||||
<div>商品列表</div>
|
|
||||||
</div>
|
|
||||||
<el-table v-loading="listLoading" :data="formobj.list" border style="width: 100%;">
|
|
||||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
|
||||||
<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="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 titleOne">
|
|
||||||
<div>商品-批次</div>
|
|
||||||
</div>
|
|
||||||
<el-table v-loading="listLoading" :data="formobj.pcList" border style="width: 100%;">
|
|
||||||
<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/inStorage/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(row.sid)
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.formobj = resp.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
this.formobj = {}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,164 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<div>
|
|
||||||
<div class="tab-header webtop">
|
|
||||||
<div>选择商品</div>
|
|
||||||
<div>
|
|
||||||
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button>
|
|
||||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="">
|
|
||||||
<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="120px" class="tab-header">
|
|
||||||
<el-form-item label="商品名称" class="searchlist">
|
|
||||||
<el-input v-model="listQuery.params.goodsSpuName" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="商品编码" class="searchlist">
|
|
||||||
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="供应商" class="searchlist">
|
|
||||||
<el-input v-model="listQuery.params.manufacturerName" placeholder="" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div class="btn" style="text-align: center;">
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
|
|
||||||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<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>
|
|
||||||
<div class="">
|
|
||||||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column width="50px" type="selection" align="center"/>
|
|
||||||
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
|
|
||||||
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
|
|
||||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
|
|
||||||
<el-table-column prop="indexes" label="规格" align="center" />
|
|
||||||
<el-table-column prop="goodsUnitName" label="单位" align="center" />
|
|
||||||
<el-table-column prop="manufacturerName" label="供应商" align="center" />
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import Pagination from '@/components/pagination'
|
|
||||||
import { chooseproducts } from '@/api/Common/dictcommons'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SelectVehicle',
|
|
||||||
components: {
|
|
||||||
Pagination
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
isSearchShow: false,
|
|
||||||
searchxianshitit: '隐藏查询条件',
|
|
||||||
tableKey: 0,
|
|
||||||
sids: [],
|
|
||||||
list: [],
|
|
||||||
number: '',
|
|
||||||
listLoading: false,
|
|
||||||
listQuery: {
|
|
||||||
current: 1,
|
|
||||||
size: 5,
|
|
||||||
params: {
|
|
||||||
createOrgSid: '',
|
|
||||||
goodsSpuName: '',
|
|
||||||
goodsSkuCode: '',
|
|
||||||
manufacturerName: ''
|
|
||||||
},
|
|
||||||
total: 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 搜索条件效果
|
|
||||||
clicksearchShow() {
|
|
||||||
this.isSearchShow = !this.isSearchShow
|
|
||||||
if (this.isSearchShow) {
|
|
||||||
this.searchxianshitit = '隐藏查询条件'
|
|
||||||
} else {
|
|
||||||
this.searchxianshitit = '显示查询条件'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
indexMethod(index) {
|
|
||||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
|
||||||
var pageindex = index + 1 + pagestart
|
|
||||||
return pageindex
|
|
||||||
},
|
|
||||||
// 查询列表信息
|
|
||||||
getList() {
|
|
||||||
this.listLoading = true
|
|
||||||
chooseproducts(this.listQuery).then((response) => {
|
|
||||||
this.listLoading = false
|
|
||||||
if (response.success) {
|
|
||||||
this.listQuery.total = response.data.total
|
|
||||||
this.list = response.data.records
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 查询按钮
|
|
||||||
handleFilter() {
|
|
||||||
this.listQuery.current = 1
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
// 重置按钮
|
|
||||||
handleReset() {
|
|
||||||
this.listQuery.current = 1
|
|
||||||
this.listQuery.size = 5
|
|
||||||
this.listQuery.total = 0
|
|
||||||
this.listQuery.params.goodsSpuName = ''
|
|
||||||
this.listQuery.params.goodsSkuCode = ''
|
|
||||||
this.listQuery.params.manufacturerName = ''
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
handleSelectionChange(row) {
|
|
||||||
this.sids = row
|
|
||||||
},
|
|
||||||
showData(value, createOrgSid) {
|
|
||||||
// const aa = []
|
|
||||||
// if (value.length > 0) {
|
|
||||||
// for (var i = 0; i < value.length; i++) {
|
|
||||||
// aa.push(value[i].saleVehSid)
|
|
||||||
// }
|
|
||||||
// this.listQuery.params.saleVehSids = aa
|
|
||||||
// } else {
|
|
||||||
// this.listQuery.params.saleVehSids = []
|
|
||||||
// }``
|
|
||||||
this.listQuery.params.createOrgSid = createOrgSid
|
|
||||||
this.listQuery.current = 1
|
|
||||||
this.listQuery.size = 5
|
|
||||||
this.listQuery.total = 0
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
// 添加修改返回
|
|
||||||
AddUpdateReturn() {
|
|
||||||
if (this.sids.length > 0) {
|
|
||||||
this.$emit('backData', this.sids)
|
|
||||||
} else {
|
|
||||||
this.$notify({ title: '提示', message: '请至少选择一条记录进行操作', type: 'error', duration: 2000 })
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 返回
|
|
||||||
handleReturn() {
|
|
||||||
this.$emit('doback')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
</style>
|
|
||||||
@@ -1,418 +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" :rules="rules" class="formaddcopy02">
|
|
||||||
<!-- <div class="title">
|
|
||||||
<div>基础信息</div>
|
|
||||||
</div> -->
|
|
||||||
<el-row class="first_row">
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">制单人</div>
|
|
||||||
<el-form-item>
|
|
||||||
<span class="addinputw addinputInfo">{{ formobj.createByName }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">制单部门</div>
|
|
||||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 单据日期</div>
|
|
||||||
<el-form-item prop="createTime"> <el-date-picker v-model="formobj.createTime" type="date"
|
|
||||||
class="addinputw addinputInfo" value-format="yyyy-MM-dd" placeholder="选择日期">
|
|
||||||
</el-date-picker></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">来源单号</div>
|
|
||||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">单据状态</div>
|
|
||||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.billState }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 上架人</div>
|
|
||||||
<el-form-item prop="upShelfName">
|
|
||||||
<el-select v-model="formobj.upShelfName" filterable clearable placeholder="请选择"
|
|
||||||
class="addinputw addinputInfo" @change="allOrgperSelect">
|
|
||||||
<el-option v-for="item in allOrgperList" :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="24">
|
|
||||||
<div class="span-sty">备注</div>
|
|
||||||
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo"
|
|
||||||
type="textarea" :rows="1" clearable /></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<div class="title">
|
|
||||||
<div>商品列表</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<el-table v-loading="listLoading" :data="formobj.list" border>
|
|
||||||
<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="doGoodsDel(scope.row.goodsSkuSid)">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" />
|
|
||||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
|
|
||||||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" />
|
|
||||||
<el-table-column label="单位" prop="unit" align="center" />
|
|
||||||
<!-- <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(scope.row,$event)">
|
|
||||||
<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">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input ref="focusAssumptionInput" v-model="scope.row.count" clearable placeholder=""
|
|
||||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="载具编号" align="center">
|
|
||||||
<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/inStorage/receivingGoods.js'
|
|
||||||
import {
|
|
||||||
getCurrentDate
|
|
||||||
} from '@/utils/index.js'
|
|
||||||
import {
|
|
||||||
selAllByOrgSidPath,
|
|
||||||
getOrgSidByPath,
|
|
||||||
getWarehouses,
|
|
||||||
getWarehouseareas
|
|
||||||
} from '@/api/Common/dictcommons'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
listLoading: false,
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
"sid": "",
|
|
||||||
"billNo": "",
|
|
||||||
"createBySid": window.sessionStorage.getItem('userSid'),
|
|
||||||
"createByName": window.sessionStorage.getItem('name'),
|
|
||||||
"deptName": '',
|
|
||||||
"deptSid": '',
|
|
||||||
"sourceBillNo": "",
|
|
||||||
"sourceBillSid": "",
|
|
||||||
"billState": "新建",
|
|
||||||
"upShelfSid": "",
|
|
||||||
"upShelfName": '',
|
|
||||||
"list": [
|
|
||||||
|
|
||||||
],
|
|
||||||
"remarks": "",
|
|
||||||
'createOrgSid': "",
|
|
||||||
'useOrgSid': ""
|
|
||||||
},
|
|
||||||
hideUploadBtn: false,
|
|
||||||
busTypeList: [{
|
|
||||||
name: "业务类型1",
|
|
||||||
sid: "1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "业务类型2",
|
|
||||||
sid: "2"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
supplierList: [],
|
|
||||||
warehouseList: [],
|
|
||||||
warehouseRackList: [],
|
|
||||||
allOrgperList: [],
|
|
||||||
rules: {
|
|
||||||
createTime: [{
|
|
||||||
required: true,
|
|
||||||
message: '到货日期不能为空',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
upShelfName: [{
|
|
||||||
required: true,
|
|
||||||
message: '请选择上架人员',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getOrgPathSid() {
|
|
||||||
getOrgSidByPath({
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.formobj.createOrgSid = res.data
|
|
||||||
this.formobj.useOrgSid = res.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
doGoodsDel(sid) {
|
|
||||||
console.log("doGoodsDel》》》》", sid)
|
|
||||||
|
|
||||||
this.$confirm("是否确定删除此商品?", '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
const index = this.formobj.list.findIndex((item) => item.goodsSkuSid === 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
|
|
||||||
this.$refs['form_obj'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
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": window.sessionStorage.getItem('userSid'),
|
|
||||||
"createByName": window.sessionStorage.getItem('name'),
|
|
||||||
"createTime": getCurrentDate(),
|
|
||||||
"deptName": '',
|
|
||||||
"deptSid": '',
|
|
||||||
"sourceBillNo": "",
|
|
||||||
"sourceBillSid": "",
|
|
||||||
"billState": "新建",
|
|
||||||
"upShelfSid": "",
|
|
||||||
"upShelfName": '',
|
|
||||||
"list": [
|
|
||||||
|
|
||||||
],
|
|
||||||
"remarks": "",
|
|
||||||
'createOrgSid': "",
|
|
||||||
'useOrgSid': ""
|
|
||||||
}
|
|
||||||
this.$emit('doback')
|
|
||||||
},
|
|
||||||
|
|
||||||
showAdd() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['form_obj'].clearValidate()
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
showEdit(row) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['form_obj'].clearValidate()
|
|
||||||
})
|
|
||||||
|
|
||||||
this.getWarehouseList()
|
|
||||||
this.getAllOrgper()
|
|
||||||
this.getOrgPathSid()
|
|
||||||
var params = {
|
|
||||||
sid: row.sid,
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
userSid: window.sessionStorage.getItem('userSid')
|
|
||||||
}
|
|
||||||
|
|
||||||
req.initUpshelf(params)
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.formobj = resp.data
|
|
||||||
|
|
||||||
// this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window
|
|
||||||
// .sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
|
|
||||||
// this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
|
|
||||||
// .getItem('defaultOrgPath').lastIndexOf('/') + 1)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
this.formobj = {}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getAllOrgper() {
|
|
||||||
selAllByOrgSidPath({
|
|
||||||
orgSidPath: window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.allOrgperList = res.data
|
|
||||||
|
|
||||||
console.log("aaaaaa", this.allOrgperList);
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
allOrgperSelect(val) {
|
|
||||||
console.log("allOrgperSelect", val);
|
|
||||||
|
|
||||||
const choose = this.allOrgperList.filter((item) => item.sid == val)
|
|
||||||
console.log('>>>>>>>>>selectWarehouseName', choose)
|
|
||||||
this.formobj.upShelfName = choose[0].name
|
|
||||||
this.formobj.upShelfSid = choose[0].sid
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
getWarehouseList() {
|
|
||||||
var parpams = {
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
}
|
|
||||||
getWarehouses(parpams).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.warehouseList = res.data
|
|
||||||
|
|
||||||
console.log("aaaaaa", this.warehouseList);
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getWarehouseAreaList(sid) {
|
|
||||||
var query = {
|
|
||||||
ckSid: sid
|
|
||||||
}
|
|
||||||
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(row, 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 scoped>
|
|
||||||
/deep/ .el-form-item__error {
|
|
||||||
margin-left: 120px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.must {
|
|
||||||
color: #f00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,352 +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="item.sid" :label="item.name" :value="item.name">
|
|
||||||
</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/inStorage/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: '',
|
|
||||||
billNo: "",
|
|
||||||
sourceBillNo: "",
|
|
||||||
createTimestart: '',
|
|
||||||
createTimeEnd: '',
|
|
||||||
billstate: '',
|
|
||||||
menuUrl: '',
|
|
||||||
orgPath: '',
|
|
||||||
usersid: ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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
|
|
||||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
|
|
||||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
this.queryParams.params.menuUrl = this.$route.path
|
|
||||||
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: '',
|
|
||||||
billNo: "",
|
|
||||||
sourceBillNo: "",
|
|
||||||
createTimestart: '',
|
|
||||||
createTimeEnd: '',
|
|
||||||
billstate: '',
|
|
||||||
menuUrl: '',
|
|
||||||
orgPath: '',
|
|
||||||
usersid: ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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,420 +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" :rules="rules" class="formaddcopy02">
|
|
||||||
<div class="title">
|
|
||||||
<div>基础信息</div>
|
|
||||||
</div>
|
|
||||||
<el-row class="first_row">
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">制单人</div>
|
|
||||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">制单部门</div>
|
|
||||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 单据日期</div>
|
|
||||||
<el-form-item prop="createTime"> <el-date-picker v-model="formobj.createTime" type="date"
|
|
||||||
class="addinputw addinputInfo" value-format="yyyy-MM-dd" placeholder="选择日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</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.sourceBillNo }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">单据状态</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.billState }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty"><span class="must">*</span> 上架人</div>
|
|
||||||
<el-form-item prop="upShelfName">
|
|
||||||
<el-select v-model="formobj.upShelfName" filterable clearable placeholder="请选择"
|
|
||||||
class="addinputw addinputInfo" @change="allOrgperSelect">
|
|
||||||
<el-option v-for="item in allOrgperList" :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="24">
|
|
||||||
<div class="span-sty">备注</div>
|
|
||||||
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo"
|
|
||||||
clearable /></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<div class="title">
|
|
||||||
<div>商品列表</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<el-table v-loading="listLoading" :data="formobj.list" border>
|
|
||||||
<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.count" 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/inStorage/upShelf.js'
|
|
||||||
import {
|
|
||||||
getCurrentDate
|
|
||||||
} from '@/utils/index.js'
|
|
||||||
import {
|
|
||||||
selAllByOrgSidPath,
|
|
||||||
getWarehouses,
|
|
||||||
getWarehouseareas
|
|
||||||
} from '@/api/Common/dictcommons'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
title: "【新增】",
|
|
||||||
listLoading: false,
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
"sid": "",
|
|
||||||
"billNo": "",
|
|
||||||
"createBySid": window.sessionStorage.getItem('userSid'),
|
|
||||||
"createByName": window.sessionStorage.getItem('name'),
|
|
||||||
"createTime": getCurrentDate(),
|
|
||||||
"deptName": '',
|
|
||||||
"deptSid": '',
|
|
||||||
"sourceBillNo": "",
|
|
||||||
"sourceBillSid": "",
|
|
||||||
"billState": "新建",
|
|
||||||
"upShelfSid": "",
|
|
||||||
"upShelfName": '',
|
|
||||||
"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,
|
|
||||||
allOrgperList: [],
|
|
||||||
rules: {
|
|
||||||
createTime: [{
|
|
||||||
required: true,
|
|
||||||
message: '到货日期不能为空',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
upShelfName: [{
|
|
||||||
required: true,
|
|
||||||
message: '请选择上架人员',
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
indexMethod(index) {
|
|
||||||
return index + 1
|
|
||||||
},
|
|
||||||
saveOrUpdate() {
|
|
||||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
|
||||||
|
|
||||||
|
|
||||||
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: '商品上架数量不能为空'
|
|
||||||
})
|
|
||||||
|
|
||||||
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": window.sessionStorage.getItem('userSid'),
|
|
||||||
"createByName": window.sessionStorage.getItem('name'),
|
|
||||||
"createTime": getCurrentDate(),
|
|
||||||
"deptName": '',
|
|
||||||
"deptSid": '',
|
|
||||||
"sourceBillNo": "",
|
|
||||||
"sourceBillSid": "",
|
|
||||||
"billState": "新建",
|
|
||||||
"upShelfSid": "",
|
|
||||||
"upShelfName": '',
|
|
||||||
"list": [
|
|
||||||
|
|
||||||
],
|
|
||||||
"remarks": ""
|
|
||||||
}
|
|
||||||
this.submitdisabled = false
|
|
||||||
this.$emit('doback')
|
|
||||||
},
|
|
||||||
|
|
||||||
showAdd() {
|
|
||||||
this.title = "【新增】"
|
|
||||||
this.getWarehouseList()
|
|
||||||
this.getAllOrgper()
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['form_obj'].clearValidate()
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
showEdit(row) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['form_obj'].clearValidate()
|
|
||||||
})
|
|
||||||
|
|
||||||
this.getWarehouseList()
|
|
||||||
this.getAllOrgper()
|
|
||||||
this.title = "【修改】"
|
|
||||||
var params = {
|
|
||||||
sid: row.sid
|
|
||||||
}
|
|
||||||
req.init(params)
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.formobj = resp.data
|
|
||||||
|
|
||||||
this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window
|
|
||||||
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
|
|
||||||
this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
|
|
||||||
.getItem('defaultOrgPath').lastIndexOf('/') + 1)
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
this.formobj = {}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getAllOrgper() {
|
|
||||||
selAllByOrgSidPath({
|
|
||||||
orgSidPath: window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.allOrgperList = res.data
|
|
||||||
|
|
||||||
console.log("aaaaaa", this.allOrgperList);
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
allOrgperSelect(val) {
|
|
||||||
console.log("allOrgperSelect", val);
|
|
||||||
|
|
||||||
const choose = this.allOrgperList.filter((item) => item.sid == val)
|
|
||||||
console.log('>>>>>>>>>selectWarehouseName', choose)
|
|
||||||
this.formobj.upShelfName = choose[0].name
|
|
||||||
this.formobj.upShelfSid = choose[0].sid
|
|
||||||
|
|
||||||
},
|
|
||||||
getWarehouseList() {
|
|
||||||
var parpams = {
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
}
|
|
||||||
getWarehouses(parpams).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.warehouseList = res.data
|
|
||||||
|
|
||||||
console.log("aaaaaa", this.warehouseList);
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getWarehouseAreaList(sid) {
|
|
||||||
var query = {
|
|
||||||
ckSid: sid
|
|
||||||
}
|
|
||||||
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 scoped>
|
|
||||||
/deep/ .el-form-item__error {
|
|
||||||
margin-left: 120px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.must {
|
|
||||||
color: #f00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,161 +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" class="formaddcopy02">
|
|
||||||
<div class="title">
|
|
||||||
<div>基础信息</div>
|
|
||||||
</div>
|
|
||||||
<el-row class="first_row">
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">制单人</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
|
|
||||||
<div class="span-sty">制单部门</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<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="8">
|
|
||||||
<div class="span-sty">来源单号</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">单据状态</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.billState }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">上架人</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.upShelfName }}</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>商品列表</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<el-table v-loading="listLoading" :data="formobj.list" border>
|
|
||||||
<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" />
|
|
||||||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" />
|
|
||||||
<el-table-column label="单位" prop="unit" align="center" />
|
|
||||||
<!-- <el-table-column label="批次号" prop="batchNumber" align="center" />
|
|
||||||
<el-table-column label="仓库" prop="warehouseName" align="center" />
|
|
||||||
<el-table-column label="库位" prop="warehouseRackCode" align="center" /> -->
|
|
||||||
<el-table-column label="需上架数量" prop="count" align="center" />
|
|
||||||
<el-table-column label="已上架数量" prop="actualCount" align="center" />
|
|
||||||
<el-table-column label="未上架数量" prop="noShelfCount" align="center" />
|
|
||||||
<el-table-column label="载具编号" prop="packageNo" align="center" />
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/inStorage/upShelf.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(row.sid)
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.formobj = resp.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
this.formobj = {}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,291 +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.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-date-picker v-model="formobj.createTime" type="date" style="width:100%" value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择日期">
|
|
||||||
</el-date-picker>
|
|
||||||
<!-- <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.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.remarks}}</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.detailsList" 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="操作" width="80" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button type="primary" size="mini" @click="toDel(scope.$index)">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="商品名称" prop="goodsSpuName" align="center" />
|
|
||||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
|
|
||||||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" />
|
|
||||||
<el-table-column label="单位" prop="unit" align="center" />
|
|
||||||
<el-table-column label="仓库" prop="warehouseName" align="center" />
|
|
||||||
<el-table-column label="库位" prop="warehouseRackCode" align="center" />
|
|
||||||
<el-table-column label="配货数量" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input ref="focusAssumptionInput" v-model="scope.row.distributeCount" 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/storage/outStorage.js'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
listLoading: false,
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
"sourceBillSid": "",
|
|
||||||
"sourceBillNo": "",
|
|
||||||
"billNo": "",
|
|
||||||
"createByName": "",
|
|
||||||
"billState": "",
|
|
||||||
"createBySid": "",
|
|
||||||
"createTime": "",
|
|
||||||
"remarks": "",
|
|
||||||
"detailsList": [
|
|
||||||
|
|
||||||
]
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
indexMethod(index) {
|
|
||||||
return index + 1
|
|
||||||
},
|
|
||||||
|
|
||||||
handleReturn(isreload) {
|
|
||||||
if (isreload === 'true') this.$emit('reloadlist')
|
|
||||||
this.formobj = {
|
|
||||||
"sourceBillSid": "",
|
|
||||||
"sourceBillNo": "",
|
|
||||||
"billNo": "",
|
|
||||||
"createByName": "",
|
|
||||||
"billState": "",
|
|
||||||
"createBySid": "",
|
|
||||||
"createTime": "",
|
|
||||||
"remarks": "",
|
|
||||||
"detailsList": [
|
|
||||||
|
|
||||||
]
|
|
||||||
}
|
|
||||||
this.$emit('doback')
|
|
||||||
},
|
|
||||||
|
|
||||||
showAdd() {
|
|
||||||
|
|
||||||
},
|
|
||||||
showEdit(row) {
|
|
||||||
|
|
||||||
var params = {
|
|
||||||
sid: row.sid
|
|
||||||
}
|
|
||||||
req.initDistribution(params)
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.formobj = resp.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
this.formobj = {}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
toDel(index) {
|
|
||||||
const tip = '请确认是否删除所选商品?'
|
|
||||||
this.$confirm(tip, '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.formobj.detailsList.splice(index, 1)
|
|
||||||
|
|
||||||
|
|
||||||
}).catch(() => {})
|
|
||||||
},
|
|
||||||
saveOrUpdate(){
|
|
||||||
|
|
||||||
this.$refs['form_obj'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.submitdisabled = true
|
|
||||||
req.saveDistribution(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
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</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,336 +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.busTypeValue" 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-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="操作" width="100" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button type="primary" size="mini" @click="toInfo(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="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/outStorage/outStorage.js'
|
|
||||||
import ButtonBar from '@/components/ButtonBar'
|
|
||||||
import Pagination from '@/components/pagination'
|
|
||||||
import pageye from '@/components/pagination/pageye'
|
|
||||||
import divAdd from './outStorageAdd.vue'
|
|
||||||
import divInfo from './outStorageInfo.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: 'danger',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'del',
|
|
||||||
btnKey: 'doDel',
|
|
||||||
btnLabel: '删除'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'info',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'cross',
|
|
||||||
btnKey: 'doClose',
|
|
||||||
btnLabel: '关闭'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
queryParams: {
|
|
||||||
current: 1,
|
|
||||||
size: 10,
|
|
||||||
total: 0,
|
|
||||||
params: {
|
|
||||||
"billNo": "",
|
|
||||||
"sourceBillNo": "",
|
|
||||||
"busTypeValue": "",
|
|
||||||
"billState": "",
|
|
||||||
"createTimeStart": "",
|
|
||||||
"createTimeEnd": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
billStateList: [{
|
|
||||||
name: "新建",
|
|
||||||
sid: "0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "完成",
|
|
||||||
sid: "1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
busTypeList: [{
|
|
||||||
name: "业务类型1",
|
|
||||||
sid: "0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "业务类型2",
|
|
||||||
sid: "1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
sids: [],
|
|
||||||
selectionList: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.loadList()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
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 'doDel':
|
|
||||||
this.doDel()
|
|
||||||
break
|
|
||||||
case 'toAdd':
|
|
||||||
this.toAdd()
|
|
||||||
break
|
|
||||||
case 'toEdit':
|
|
||||||
this.toEdit()
|
|
||||||
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() {
|
|
||||||
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])
|
|
||||||
|
|
||||||
// this.viewState = 5
|
|
||||||
// this.$refs['distributionAdd'].showEdit(this.selectionList[0])
|
|
||||||
},
|
|
||||||
|
|
||||||
doClose() {
|
|
||||||
this.$store.dispatch('tagsView/delView', this.$route)
|
|
||||||
this.$router.go(-1)
|
|
||||||
},
|
|
||||||
toInfo(row) {
|
|
||||||
this.viewState = 4
|
|
||||||
this.$refs['divInfo'].showEdit(row)
|
|
||||||
},
|
|
||||||
resetState() {
|
|
||||||
this.viewState = 1
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
</style>
|
|
||||||
@@ -1,509 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<div v-show="viewState == 1">
|
|
||||||
<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="primary" size="small" :disabled="submitdisabled" @click="submit">确认</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" class="formaddcopy02">
|
|
||||||
<div class="title">
|
|
||||||
<div>基础信息</div>
|
|
||||||
</div>
|
|
||||||
<el-row class="first_row">
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">单据编号</div>
|
|
||||||
<el-form-item><span class="addinputInfo addinputw">{{ formobj.billNo }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">制单人</div>
|
|
||||||
<el-form-item><span class="addinputInfo addinputw">{{ formobj.createByName }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">单据日期</div>
|
|
||||||
<el-form-item><el-date-picker v-model="formobj.createTime" type="date" class="addinputInfo addinputw"
|
|
||||||
value-format="yyyy-MM-dd" placeholder="选择日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">来源单号</div>
|
|
||||||
<el-form-item><span class="addinputInfo addinputw">{{ formobj.sourceBillNo }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">业务类型</div>
|
|
||||||
<el-form-item><el-select v-model="formobj.busTypeValue" filterable clearable placeholder="请选择"
|
|
||||||
class="addinputInfo addinputw" @change="busTypeSelect">
|
|
||||||
<el-option v-for="item in busTypeList" :key="item.sid" :label="item.name" :value="item.sid">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">单据状态</div>
|
|
||||||
<el-form-item><span class="addinputInfo addinputw">{{ formobj.billState }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="24">
|
|
||||||
<div class="span-sty">备注</div>
|
|
||||||
<el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputInfo addinputw"
|
|
||||||
type="textarea" :rows="4" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
<div class="title titleOne">
|
|
||||||
<div>商品列表</div>
|
|
||||||
<el-button type="primary" size="small" class="btntopblueline" @click="selectProducts">选择商品</el-button>
|
|
||||||
</div>
|
|
||||||
<el-table v-loading="listLoading" :data="formobj.detailsList" border>
|
|
||||||
<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="danger" size="small" @click="commodityDelete(scope.$index)">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<!-- <el-table-column align="center" width="100" :render-header="commodityHeader">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<i class="el-icon-delete" @click="commodityDelete(scope.$index)"></i>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="商品名称" align="center" min-width="120">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-popover placement="right" width="900" trigger="click">
|
|
||||||
<div>
|
|
||||||
<el-table :data="commodityData" v-loading="commodityLoading" highlight-current-row
|
|
||||||
@current-change="commodityCurrentChange($event, scope.row)">
|
|
||||||
<el-table-column fixed prop="goodsSpuName" label="商品名称" align="center" />
|
|
||||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
|
|
||||||
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
|
|
||||||
<el-table-column prop="unit" label="单位" align="center" />
|
|
||||||
</el-table>
|
|
||||||
<el-pagination :page.sync="commodityQuery.current" :page-size="commodityQuery.size"
|
|
||||||
layout="total, pager" :total="commodityQuery.total" />
|
|
||||||
</div>
|
|
||||||
<el-input slot="reference" v-model="scope.row.goodsSpuName"
|
|
||||||
@input="commodityInput(scope.row.goodsSpuName)" clearable placeholder="商品名称" />
|
|
||||||
</el-popover>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
<el-table-column label="商品ID" prop="goodsID" align="center" />
|
|
||||||
<el-table-column label="商品名称" prop="goodsSpuName" align="center" />
|
|
||||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
|
|
||||||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" />
|
|
||||||
<el-table-column label="单位" prop="unit" align="center" />
|
|
||||||
<el-table-column label="仓库" prop="warehouseName" align="center" />
|
|
||||||
<el-table-column label="库位" prop="warehouseRackCode" align="center" />
|
|
||||||
<el-table-column label="销售单价" prop="money" align="center" />
|
|
||||||
<el-table-column label="出库数量" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input ref="focusAssumptionInput" v-model="scope.row.outCount"
|
|
||||||
@input="commodityComputeYHAndXSJE(scope.row,$event)" clearable placeholder=""
|
|
||||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="金额" prop="moneyAll" align="center" />
|
|
||||||
</el-table>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 选择商品 -->
|
|
||||||
<chooseproducts v-show="viewState == 2" ref="divSp" @backData="backData" @doback="resetState" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/outStorage/outStorage.js'
|
|
||||||
import chooseproducts from './relation/chooseproducts'
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
chooseproducts
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
viewState: 1,
|
|
||||||
title: '【新增】',
|
|
||||||
listLoading: false,
|
|
||||||
submitdisabled: false,
|
|
||||||
formobj: {
|
|
||||||
"sourceBillNo": "",
|
|
||||||
"createByName": window.sessionStorage.getItem('name'),
|
|
||||||
"busTypeKey": "",
|
|
||||||
"busTypeValue": "",
|
|
||||||
"billState": '新建',
|
|
||||||
"createOrgSid": window.sessionStorage.getItem('orgSid'),
|
|
||||||
"useOrgSid": window.sessionStorage.getItem('orgSid'),
|
|
||||||
"sid": "",
|
|
||||||
"createBySid": window.sessionStorage.getItem('userSid'),
|
|
||||||
"createTime": "",
|
|
||||||
"remarks": "",
|
|
||||||
"detailsList": [
|
|
||||||
|
|
||||||
]
|
|
||||||
},
|
|
||||||
hideUploadBtn: false,
|
|
||||||
busTypeList: [{
|
|
||||||
name: "业务类型1",
|
|
||||||
sid: "0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "业务类型2",
|
|
||||||
sid: "1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
// // commodity商品
|
|
||||||
// commodityKey: 1,
|
|
||||||
// commodityLoading: false,
|
|
||||||
// commodityQuery: {
|
|
||||||
// current: 1,
|
|
||||||
// size: 2,
|
|
||||||
// total: 0,
|
|
||||||
// params: {
|
|
||||||
// name: '',
|
|
||||||
// inOrg: "",
|
|
||||||
// outOrg: ""
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// commodityData: [],
|
|
||||||
isUpdata: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
backData(value) {
|
|
||||||
this.viewState = 1
|
|
||||||
if (value.length > 0) {
|
|
||||||
value.forEach((e) => {
|
|
||||||
|
|
||||||
this.formobj.detailsList.push({
|
|
||||||
goodSpuSid: e.goodsSpuSid,
|
|
||||||
goodsSpuName: e.goodsSpuName,
|
|
||||||
goodsSkuSid: e.goodsSkuSid,
|
|
||||||
goodsSkuTitle: e.goodsSkuTitle,
|
|
||||||
goodsSkuCode: e.goodsSkuCode,
|
|
||||||
goodsSkuOwnSpec: e.goodsSkuOwnSpec,
|
|
||||||
unit: e.unit,
|
|
||||||
warehouseSid: e.warehouseSid,
|
|
||||||
warehouseName: e.warehouseName,
|
|
||||||
warehouseRackSid: e.warehouseRackSid,
|
|
||||||
warehouseRackCode: e.warehouseRackCode,
|
|
||||||
money: e.money,
|
|
||||||
moneyAll: '',
|
|
||||||
outCount: '',
|
|
||||||
inventorySid: e.inventorySid, // 库存商品sid
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
resetState() {
|
|
||||||
this.viewState = 1
|
|
||||||
},
|
|
||||||
selectProducts() {
|
|
||||||
this.viewState = 2
|
|
||||||
const aa = []
|
|
||||||
this.$refs['divSp'].showData(aa, this.formobj.createOrgSid)
|
|
||||||
},
|
|
||||||
|
|
||||||
// commodityInput(value) {
|
|
||||||
// this.commodityQuery.params.name = value
|
|
||||||
// this.commodityLoading = true
|
|
||||||
// req.getGoodsListPage(this.commodityQuery).then((response) => {
|
|
||||||
// if (response.success) {
|
|
||||||
// this.commodityLoading = false
|
|
||||||
// this.commodityData = response.data.records
|
|
||||||
// this.commodityQuery.total = response.data.total
|
|
||||||
// } else {
|
|
||||||
// this.serviceLoading = false
|
|
||||||
// this.commodityData = []
|
|
||||||
// this.commodityQuery.total = 0
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// commodityDelete(index) {
|
|
||||||
// this.formobj.detailsList.splice(index, 1)
|
|
||||||
// },
|
|
||||||
// commodityCurrentChange(value, row) {
|
|
||||||
// console.log("commodityCurrentChange》》》》", value)
|
|
||||||
// console.log("commodityCurrentChange》》》》", row)
|
|
||||||
// row.inventorySid = value.inventorySid
|
|
||||||
// row.goodSpuSid = value.goodSpuSid
|
|
||||||
// row.goodsSkuSid = value.goodsSkuSid
|
|
||||||
// row.goodsSkuTitle = value.goodsSkuTitle
|
|
||||||
// row.goodsSpuName = value.goodsSpuName
|
|
||||||
// row.goodsSkuCode = value.goodsSkuCode
|
|
||||||
// row.goodsSkuOwnSpec = value.goodsSkuOwnSpec
|
|
||||||
// row.unit = value.unit
|
|
||||||
// row.warehouseSid = value.warehouseSid
|
|
||||||
// row.warehouseName = value.warehouseName
|
|
||||||
// row.warehouseRackSid = value.warehouseRackSid
|
|
||||||
// row.warehouseRackCode = value.warehouseRackCode
|
|
||||||
// row.money = value.money
|
|
||||||
// row.moneyAll = 0
|
|
||||||
// row.outCount = 0
|
|
||||||
// document.body.click()
|
|
||||||
// },
|
|
||||||
|
|
||||||
// // 在头部标题上添加“新增”图标
|
|
||||||
// commodityHeader(h, {
|
|
||||||
// column
|
|
||||||
// }) {
|
|
||||||
// return h(
|
|
||||||
// 'div',
|
|
||||||
// [
|
|
||||||
// h('span', column.label),
|
|
||||||
// h('i', {
|
|
||||||
// class: 'add-btn-icon el-icon-plus',
|
|
||||||
// style: 'color: red;font-size:20px',
|
|
||||||
// on: {
|
|
||||||
// click: this.commodityAdd // 点击执行函数
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// ]
|
|
||||||
// )
|
|
||||||
// },
|
|
||||||
// commodityAdd() {
|
|
||||||
// this.formobj.detailsList.push({
|
|
||||||
// "inventorySid": "",
|
|
||||||
// "goodSpuSid": "",
|
|
||||||
// "goodsSpuName": "",
|
|
||||||
// "goodsSkuSid": "",
|
|
||||||
// "goodsSkuTitle": "",
|
|
||||||
// "goodsSkuCode": "",
|
|
||||||
// "goodsSkuOwnSpec": "",
|
|
||||||
// "unit": "",
|
|
||||||
// "warehouseSid": "",
|
|
||||||
// "warehouseName": "",
|
|
||||||
// "warehouseRackSid": "",
|
|
||||||
// "warehouseRackCode": "",
|
|
||||||
// "money": 0,
|
|
||||||
// "moneyAll": 0,
|
|
||||||
// "outCount": 0
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
indexMethod(index) {
|
|
||||||
return Number(index) + 1
|
|
||||||
},
|
|
||||||
saveOrUpdate() {
|
|
||||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
submit() {
|
|
||||||
|
|
||||||
if (this.formobj.createByName == '') {
|
|
||||||
this.$message({
|
|
||||||
showClose: true,
|
|
||||||
type: 'warning',
|
|
||||||
message: '制单人不能为空'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.formobj.createTime == '') {
|
|
||||||
this.$message({
|
|
||||||
showClose: true,
|
|
||||||
type: 'warning',
|
|
||||||
message: '单据日期不能为空'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.formobj.busTypeKey == '' || this.formobj.busTypeValue == '') {
|
|
||||||
this.$message({
|
|
||||||
showClose: true,
|
|
||||||
type: 'warning',
|
|
||||||
message: '单据类型不能为空'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.formobj.detailsList.length == 0) {
|
|
||||||
this.$message({
|
|
||||||
showClose: true,
|
|
||||||
type: 'warning',
|
|
||||||
message: '商品列表不能为空'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0; i < this.formobj.detailsList.length; i++) {
|
|
||||||
var item = this.formobj.detailsList[i]
|
|
||||||
|
|
||||||
|
|
||||||
if (item.goodSpuSid == '' || item.goodsSpuName == '') {
|
|
||||||
this.$message({
|
|
||||||
showClose: true,
|
|
||||||
type: 'warning',
|
|
||||||
message: '商品名称不能为空'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.goodsSkuCode == '') {
|
|
||||||
this.$message({
|
|
||||||
showClose: true,
|
|
||||||
type: 'warning',
|
|
||||||
message: '商品编码不能为空'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.outCount == 0) {
|
|
||||||
this.$message({
|
|
||||||
showClose: true,
|
|
||||||
type: 'warning',
|
|
||||||
message: '出库数量不能为0'
|
|
||||||
})
|
|
||||||
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": "",
|
|
||||||
"createByName": "",
|
|
||||||
"busTypeKey": "",
|
|
||||||
"busTypeValue": "",
|
|
||||||
"billState": '新建',
|
|
||||||
"createOrgSid": "",
|
|
||||||
"useOrgSid": "",
|
|
||||||
"sid": "",
|
|
||||||
"createBySid": "",
|
|
||||||
"createTime": "",
|
|
||||||
"remarks": "",
|
|
||||||
"detailsList": [
|
|
||||||
|
|
||||||
]
|
|
||||||
}
|
|
||||||
this.submitdisabled = false
|
|
||||||
this.isUpdata = false
|
|
||||||
this.$emit('doback')
|
|
||||||
},
|
|
||||||
|
|
||||||
showAdd() {
|
|
||||||
this.title = "【新增】"
|
|
||||||
this.isUpdata = false
|
|
||||||
},
|
|
||||||
showEdit(row) {
|
|
||||||
this.title = "【修改】"
|
|
||||||
this.isUpdata = true
|
|
||||||
var params = {
|
|
||||||
sid: row.sid
|
|
||||||
}
|
|
||||||
|
|
||||||
req.init(params)
|
|
||||||
.then(resp => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.formobj = resp.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
this.formobj = {}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
busTypeSelect(val) {
|
|
||||||
const choose = this.busTypeList.filter((item) => item.sid == val)
|
|
||||||
console.log('>>>>>>>>>busTypeSelect', choose)
|
|
||||||
this.formobj.busTypeKey = choose[0].sid
|
|
||||||
this.formobj.busTypeValue = choose[0].name
|
|
||||||
|
|
||||||
},
|
|
||||||
commodityComputeYHAndXSJE(row, val) {
|
|
||||||
console.log("aaa", row);
|
|
||||||
console.log("aaa", val);
|
|
||||||
|
|
||||||
row.moneyAll = (Number(row.money) * Number(row.outCount)).toFixed(2)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.span-sty {
|
|
||||||
width: 130px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.addinputInfo addinputw {
|
|
||||||
margin-left: 120px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
|
|
||||||
margin-left: 120px !important;
|
|
||||||
width: calc(100% - 115px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,152 +0,0 @@
|
|||||||
outStorage<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" class="formaddcopy02">
|
|
||||||
<div class="title">
|
|
||||||
<div>基础信息</div>
|
|
||||||
</div>
|
|
||||||
<el-row class="first_row">
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">单据编号</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">制单人</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<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><span class="addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">业务类型</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.busTypeValue }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="span-sty">单据状态</div>
|
|
||||||
<el-form-item><span class="addinputInfo">{{ formobj.billState }}</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>商品列表</div>
|
|
||||||
</div>
|
|
||||||
<el-table v-loading="listLoading" :data="formobj.detailsList" border>
|
|
||||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
|
||||||
<el-table-column label="商品名称" prop="goodsSpuName" align="center" />
|
|
||||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
|
|
||||||
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" />
|
|
||||||
<el-table-column label="单位" prop="unit" align="center" />
|
|
||||||
<el-table-column label="出库数量" prop="outCount" align="center" />
|
|
||||||
</el-table>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/outStorage/outStorage.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 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.first_row {
|
|
||||||
border-top: 1px solid #E0E3EB;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleOne {
|
|
||||||
padding: 7px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,164 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<div>
|
|
||||||
<div class="tab-header webtop">
|
|
||||||
<div>选择商品</div>
|
|
||||||
<div>
|
|
||||||
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button>
|
|
||||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="">
|
|
||||||
<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="120px" class="tab-header">
|
|
||||||
<el-form-item label="商品名称" class="searchlist">
|
|
||||||
<el-input v-model="listQuery.params.goodsSpuName" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="商品编码" class="searchlist">
|
|
||||||
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="供应商" class="searchlist">
|
|
||||||
<el-input v-model="listQuery.params.manufacturerName" placeholder="" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div class="btn" style="text-align: center;">
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
|
|
||||||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<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>
|
|
||||||
<div class="">
|
|
||||||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column width="50px" type="selection" align="center"/>
|
|
||||||
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
|
|
||||||
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
|
|
||||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
|
|
||||||
<el-table-column prop="indexes" label="规格" align="center" />
|
|
||||||
<el-table-column prop="goodsUnitName" label="单位" align="center" />
|
|
||||||
<el-table-column prop="manufacturerName" label="供应商" align="center" />
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import Pagination from '@/components/pagination'
|
|
||||||
import { chooseproducts } from '@/api/Common/dictcommons'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SelectVehicle',
|
|
||||||
components: {
|
|
||||||
Pagination
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
isSearchShow: false,
|
|
||||||
searchxianshitit: '隐藏查询条件',
|
|
||||||
tableKey: 0,
|
|
||||||
sids: [],
|
|
||||||
list: [],
|
|
||||||
number: '',
|
|
||||||
listLoading: false,
|
|
||||||
listQuery: {
|
|
||||||
current: 1,
|
|
||||||
size: 5,
|
|
||||||
params: {
|
|
||||||
createOrgSid: '',
|
|
||||||
goodsSpuName: '',
|
|
||||||
goodsSkuCode: '',
|
|
||||||
manufacturerName: ''
|
|
||||||
},
|
|
||||||
total: 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 搜索条件效果
|
|
||||||
clicksearchShow() {
|
|
||||||
this.isSearchShow = !this.isSearchShow
|
|
||||||
if (this.isSearchShow) {
|
|
||||||
this.searchxianshitit = '隐藏查询条件'
|
|
||||||
} else {
|
|
||||||
this.searchxianshitit = '显示查询条件'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
indexMethod(index) {
|
|
||||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
|
||||||
var pageindex = index + 1 + pagestart
|
|
||||||
return pageindex
|
|
||||||
},
|
|
||||||
// 查询列表信息
|
|
||||||
getList() {
|
|
||||||
this.listLoading = true
|
|
||||||
chooseproducts(this.listQuery).then((response) => {
|
|
||||||
this.listLoading = false
|
|
||||||
if (response.success) {
|
|
||||||
this.listQuery.total = response.data.total
|
|
||||||
this.list = response.data.records
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 查询按钮
|
|
||||||
handleFilter() {
|
|
||||||
this.listQuery.current = 1
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
// 重置按钮
|
|
||||||
handleReset() {
|
|
||||||
this.listQuery.current = 1
|
|
||||||
this.listQuery.size = 5
|
|
||||||
this.listQuery.total = 0
|
|
||||||
this.listQuery.params.goodsSpuName = ''
|
|
||||||
this.listQuery.params.goodsSkuCode = ''
|
|
||||||
this.listQuery.params.manufacturerName = ''
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
handleSelectionChange(row) {
|
|
||||||
this.sids = row
|
|
||||||
},
|
|
||||||
showData(value, createOrgSid) {
|
|
||||||
// const aa = []
|
|
||||||
// if (value.length > 0) {
|
|
||||||
// for (var i = 0; i < value.length; i++) {
|
|
||||||
// aa.push(value[i].saleVehSid)
|
|
||||||
// }
|
|
||||||
// this.listQuery.params.saleVehSids = aa
|
|
||||||
// } else {
|
|
||||||
// this.listQuery.params.saleVehSids = []
|
|
||||||
// }``
|
|
||||||
this.listQuery.params.createOrgSid = createOrgSid
|
|
||||||
this.listQuery.current = 1
|
|
||||||
this.listQuery.size = 5
|
|
||||||
this.listQuery.total = 0
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
// 添加修改返回
|
|
||||||
AddUpdateReturn() {
|
|
||||||
if (this.sids.length > 0) {
|
|
||||||
this.$emit('backData', this.sids)
|
|
||||||
} else {
|
|
||||||
this.$notify({ title: '提示', message: '请至少选择一条记录进行操作', type: 'error', duration: 2000 })
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 返回
|
|
||||||
handleReturn() {
|
|
||||||
this.$emit('doback')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
</style>
|
|
||||||
@@ -1,435 +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="商品ID">
|
|
||||||
<el-input v-model="queryParams.params.goodsID" placeholder="" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="商品名称">
|
|
||||||
<el-input v-model="queryParams.params.goodsSpuName" placeholder="" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="商品编码">
|
|
||||||
<el-input v-model="queryParams.params.goodsSkuCode" placeholder="" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="仓库">
|
|
||||||
<el-select v-model="queryParams.params.warehouseName" placeholder="请选择" @change='selectWarehouseName'>
|
|
||||||
<el-option v-for="(item,i) in warehouseList" :key="i" :label="item.warehouseName" :value="item.sid">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="库位">
|
|
||||||
<el-select v-model="queryParams.params.warehouseRackCode" placeholder="请选择"
|
|
||||||
@change='selectWarehouseAreaCode'>
|
|
||||||
<el-option v-for="(item,i) in warehouseRackList" :key="i" :label="item.areaCode" :value="item.sid">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="供应商">
|
|
||||||
<el-select v-model="queryParams.params.billObjName" placeholder="请选择" @change='supplierNameSelect'>
|
|
||||||
<el-option v-for="(item,i) in supplierList" :key="i" :label="item.supplierName" :value="item.sid">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="批次号">
|
|
||||||
<el-input v-model="queryParams.params.batchNumber" placeholder="" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="来源单号">
|
|
||||||
<el-input v-model="queryParams.params.billNo" placeholder="" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单据类型">
|
|
||||||
<el-select v-model="queryParams.params.billType" placeholder="请选择">
|
|
||||||
<el-option v-for="(item,i) in billTypeList" :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.busTypeValue" 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-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>
|
|
||||||
<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 prop="goodsID" label="商品ID" align="center" width="120" />
|
|
||||||
<el-table-column fixed prop="goodsSpuName" label="商品名称" align="center" width="120" />
|
|
||||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" width="120" />
|
|
||||||
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" width="120" />
|
|
||||||
<el-table-column prop="unit" label="单位" align="center" width="80" />
|
|
||||||
<el-table-column prop="warehouseName" label="仓库" align="center" width="100" />
|
|
||||||
<el-table-column prop="warehouseRackCode" label="库位" align="center" width="100" />
|
|
||||||
<el-table-column prop="billNo" label="来源单号" align="center" width="120" />
|
|
||||||
<el-table-column prop="billType" label="单据类型" align="center" width="120" />
|
|
||||||
<el-table-column prop="createTime" label="发生时间" align="center" width="120" />
|
|
||||||
<el-table-column prop="busTypeValue" label="业务类型" align="center" width="120" />
|
|
||||||
<el-table-column prop="billObjName" label="客户/供应商" align="center" width="150" />
|
|
||||||
<el-table-column prop="batchNumber" label="批次号" align="center" width="100" />
|
|
||||||
<el-table-column prop="count" label="数量" align="center" width="80" />
|
|
||||||
<el-table-column prop="currentCount" 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" /> -->
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/reports/inOutStorage.js'
|
|
||||||
import {
|
|
||||||
choiceSupplierInfo,
|
|
||||||
getOrgSidByPath
|
|
||||||
} from '@/api/Common/dictcommons'
|
|
||||||
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: 'success',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'export',
|
|
||||||
btnKey: 'build',
|
|
||||||
btnLabel: '导出'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'info',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'cross',
|
|
||||||
btnKey: 'doClose',
|
|
||||||
btnLabel: '关闭'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
queryParams: {
|
|
||||||
current: 1,
|
|
||||||
size: 10,
|
|
||||||
total: 0,
|
|
||||||
params: {
|
|
||||||
"goodsID": "",
|
|
||||||
"billNo": "",
|
|
||||||
"billType": "",
|
|
||||||
"busTypeValue": "",
|
|
||||||
"billObjName": "",
|
|
||||||
"batchNumber": "",
|
|
||||||
"goodsSpuName": "",
|
|
||||||
"goodsSkuCode": "",
|
|
||||||
"warehouseName": "",
|
|
||||||
"warehouseRackCode": "",
|
|
||||||
"createTimeStart": "",
|
|
||||||
"createTimeEnd": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
billTypeList: [{
|
|
||||||
name: "单据类型1",
|
|
||||||
sid: "0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "单据类型2",
|
|
||||||
sid: "1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
busTypeList: [{
|
|
||||||
name: "业务类型1",
|
|
||||||
sid: "1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "业务类型2",
|
|
||||||
sid: "2"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
warehouseList: [],
|
|
||||||
warehouseRackList: [],
|
|
||||||
supplierList: [],
|
|
||||||
sids: [],
|
|
||||||
selectionList: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.loadList()
|
|
||||||
this.getsupplierLust()
|
|
||||||
this.getWarehouseList()
|
|
||||||
|
|
||||||
|
|
||||||
getOrgSidByPath({
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath')
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.formobj.createOrgSid = res.data
|
|
||||||
this.formobj.useOrgSid = res.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
supplierNameSelect(val) {
|
|
||||||
|
|
||||||
console.log("supplierNameSelect", val);
|
|
||||||
const choose = this.supplierList.filter((item) => item.sid == val)
|
|
||||||
console.log('>>>>>>>>>supplierNameSelect', choose)
|
|
||||||
this.queryParams.params.billObjName = choose[0].supplierName
|
|
||||||
this.queryParams.params.billObjSid = choose[0].sid
|
|
||||||
|
|
||||||
},
|
|
||||||
getsupplierLust() {
|
|
||||||
// var params = {
|
|
||||||
// createOrgSid: ""
|
|
||||||
// }
|
|
||||||
// req.choiceSupplier(params).then((res) => {
|
|
||||||
// if (res.success) {
|
|
||||||
// this.supplierList = res.data
|
|
||||||
|
|
||||||
// console.log("aaaaaa", this.supplierList);
|
|
||||||
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
choiceSupplierInfo({
|
|
||||||
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
|
|
||||||
.getItem('defaultOrgPath').lastIndexOf('/') + 1)
|
|
||||||
}).then((resp) => {
|
|
||||||
if (resp.success) {
|
|
||||||
this.supplierList = resp.data
|
|
||||||
console.log("aaaaaa", this.supplierList);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// choiceSupplierInfo({
|
|
||||||
// orgSid: res.data
|
|
||||||
// }).then((resp) => {
|
|
||||||
// if (resp.success) {
|
|
||||||
// this.supplierList = resp.data
|
|
||||||
// console.log("aaaaaa", this.supplierNameList);
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
},
|
|
||||||
getWarehouseList() {
|
|
||||||
var parpams = {
|
|
||||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
|
||||||
}
|
|
||||||
req.getWarehouses(parpams).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.warehouseList = res.data
|
|
||||||
|
|
||||||
console.log("aaaaaa", this.warehouseList);
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getWarehouseAreaList(sid) {
|
|
||||||
var query = {
|
|
||||||
ckSid: sid
|
|
||||||
}
|
|
||||||
req.getWarehouseareas(query).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.warehouseRackList = res.data
|
|
||||||
|
|
||||||
console.log("aaaaaa", this.warehouseRackList);
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
selectWarehouseName(val) {
|
|
||||||
console.log("selectWarehouseName", val);
|
|
||||||
const choose = this.warehouseList.filter((item) => item.sid == val)
|
|
||||||
console.log('>>>>>>>>>selectWarehouseName', choose)
|
|
||||||
this.queryParams.params.warehouseName = choose[0].warehouseName
|
|
||||||
this.queryParams.params.warehouseSid = choose[0].sid
|
|
||||||
|
|
||||||
this.getWarehouseAreaList(choose[0].sid)
|
|
||||||
|
|
||||||
},
|
|
||||||
selectWarehouseAreaCode(val) {
|
|
||||||
console.log("selectWarehouseAreaCode", val);
|
|
||||||
|
|
||||||
const choose = this.warehouseRackList.filter((item) => item.sid == val)
|
|
||||||
console.log('>>>>>>>>>selectWarehouseAreaCode', choose)
|
|
||||||
this.queryParams.params.warehouseRackName = choose[0].areaCode
|
|
||||||
this.queryParams.params.warehouseRackSid = choose[0].sid
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
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 'build':
|
|
||||||
// this.toBuild()
|
|
||||||
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: {
|
|
||||||
"goodsID": "",
|
|
||||||
"billNo": "",
|
|
||||||
"billType": "",
|
|
||||||
"busTypeValue": "",
|
|
||||||
"billObjName": "",
|
|
||||||
"batchNumber": "",
|
|
||||||
"goodsSpuName": "",
|
|
||||||
"goodsSkuCode": "",
|
|
||||||
"warehouseName": "",
|
|
||||||
"warehouseRackCode": "",
|
|
||||||
"createTimeStart": "",
|
|
||||||
"createTimeEnd": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.loadList()
|
|
||||||
},
|
|
||||||
|
|
||||||
toBuild() {
|
|
||||||
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 = '出入库明细_' + this.queryParams.params.createDateStart + '.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)
|
|
||||||
},
|
|
||||||
|
|
||||||
resetState() {
|
|
||||||
this.viewState = 1
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
</style>
|
|
||||||
@@ -1,285 +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="商品ID">
|
|
||||||
<el-input v-model="listQuery.params.goodsID" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<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-input v-model="listQuery.params.warehouseRackCode" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="批次号">
|
|
||||||
<el-input v-model="listQuery.params.batchNumber" 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="100" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button type="primary" size="mini" @click="toCRK(scope.row)">出入库</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="goodsID" label="商品ID" align="center" width="100" />
|
|
||||||
<el-table-column prop="goodsSpuName" label="商品名称" align="center" width="100" />
|
|
||||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" width="100" />
|
|
||||||
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" width="100" />
|
|
||||||
<el-table-column prop="unit" label="单位" align="center" width="80" />
|
|
||||||
<el-table-column prop="warehouseName" label="仓库" min-width="100" />
|
|
||||||
<el-table-column prop="warehouseRackCode" label="库位" width="100" />
|
|
||||||
<el-table-column prop="count" label="现有库存" align="center" width="100" />
|
|
||||||
<el-table-column prop="allocateCount" label="分配库存" align="center" width="100" />
|
|
||||||
<el-table-column prop="useCount" label="可用库存" align="center" width="100" />
|
|
||||||
<el-table-column prop="batchNumber" label="批次号" align="center" width="90" />
|
|
||||||
<el-table-column prop="firstInDate" label="首次入库日期" align="center" width="140" />
|
|
||||||
<el-table-column prop="dateAge" label="库龄" width="80" />
|
|
||||||
</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>
|
|
||||||
<!-- 出入库记录 -->
|
|
||||||
<inventoryRecord v-show="viewState == 2" ref="divCRK" @doback="resetState" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import Pagination from '@/components/pagination'
|
|
||||||
import pageye from '@/components/pagination/pageye'
|
|
||||||
import ButtonBar from '@/components/ButtonBar'
|
|
||||||
import req from '@/api/storage/inventory'
|
|
||||||
import inventoryRecord from './inventoryRecord'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Capital',
|
|
||||||
components: {
|
|
||||||
Pagination,
|
|
||||||
pageye,
|
|
||||||
ButtonBar,
|
|
||||||
inventoryRecord
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
btndisabled: false,
|
|
||||||
btnList: [
|
|
||||||
{
|
|
||||||
type: 'primary',
|
|
||||||
size: 'small',
|
|
||||||
icon: '',
|
|
||||||
btnKey: 'toCarry',
|
|
||||||
btnLabel: '结转'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'danger',
|
|
||||||
size: 'small',
|
|
||||||
icon: 'del',
|
|
||||||
btnKey: 'doDel',
|
|
||||||
btnLabel: '删除'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'primary',
|
|
||||||
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: 5,
|
|
||||||
total: 0,
|
|
||||||
params: {
|
|
||||||
goodsID: '',
|
|
||||||
goodsSpuName: '',
|
|
||||||
goodsSkuCode: '',
|
|
||||||
warehouseName: '',
|
|
||||||
warehouseRackCode: '',
|
|
||||||
batchNumber: ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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 'toCarry':
|
|
||||||
this.toCarry()
|
|
||||||
break
|
|
||||||
case 'doDel':
|
|
||||||
this.doDel()
|
|
||||||
break
|
|
||||||
case 'doExport':
|
|
||||||
this.doExport()
|
|
||||||
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
|
|
||||||
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: 5,
|
|
||||||
total: 0,
|
|
||||||
params: {
|
|
||||||
goodsID: '',
|
|
||||||
goodsSpuName: '',
|
|
||||||
goodsSkuCode: '',
|
|
||||||
warehouseName: '',
|
|
||||||
warehouseRackCode: '',
|
|
||||||
batchNumber: ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
toCRK(row) {
|
|
||||||
this.viewState = 2
|
|
||||||
this.$refs['divCRK'].showInfo(row)
|
|
||||||
},
|
|
||||||
toCarry() {},
|
|
||||||
doExport() {},
|
|
||||||
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.deleteBySids(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(() => {
|
|
||||||
})
|
|
||||||
},
|
|
||||||
resetState() {
|
|
||||||
this.viewState = 1
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.$store.dispatch('tagsView/delView', this.$route)
|
|
||||||
this.$router.go(-1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
</style>
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<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-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%">
|
|
||||||
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center" />
|
|
||||||
<el-table-column prop="billNo" label="来源单号" align="center" width="100" />
|
|
||||||
<el-table-column prop="billType" label="单据类型" align="center" width="100" />
|
|
||||||
<el-table-column prop="createTime" label="发生时间" align="center" width="100" />
|
|
||||||
<el-table-column prop="busTypeValue" label="业务类型" align="center" width="100" />
|
|
||||||
<el-table-column prop="billObjName" label="客户/供应商" align="center" min-width="140" />
|
|
||||||
<el-table-column prop="batchNumber" label="批次号" align="center" width="100" />
|
|
||||||
<el-table-column prop="count" label="数量" align="center" width="80" />
|
|
||||||
<el-table-column prop="currentCount" label="出入库后的库存" align="center" width="160" />
|
|
||||||
</el-table>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/storage/inventory'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'InventoryRecord',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
viewTitle: '',
|
|
||||||
tableKey: 0,
|
|
||||||
index: 0,
|
|
||||||
formobj: {
|
|
||||||
list: []
|
|
||||||
},
|
|
||||||
rules: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
showInfo(row) {
|
|
||||||
this.viewTitle = row.goodsID + '-' + row.goodsSpuName + '-' + row.goodsSkuCode
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['form_obj'].clearValidate()
|
|
||||||
})
|
|
||||||
req.getWmsInventoryRecordList({ sid: row.sid }).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.formobj.list = res.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleReturn() {
|
|
||||||
this.formobj = {
|
|
||||||
list: []
|
|
||||||
}
|
|
||||||
this.$emit('doback')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
</style>
|
|
||||||
@@ -1,262 +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="商品ID">
|
|
||||||
<el-input v-model="listQuery.params.goodsID" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<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-input v-model="listQuery.params.warehouseRackCode" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="批次号">
|
|
||||||
<el-input v-model="listQuery.params.batchNumber" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="来源单号">
|
|
||||||
<el-input v-model="listQuery.params.billNo" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单据类型">
|
|
||||||
<el-input v-model="listQuery.params.billType" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="业务类型">
|
|
||||||
<el-input v-model="listQuery.params.busTypeValue" placeholder="" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="发生时间">
|
|
||||||
<el-date-picker v-model="listQuery.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="listQuery.params.createTimeEnd" 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 label="序号" type="index" width="80" :index="indexMethod" align="center"/>
|
|
||||||
<el-table-column prop="goodsID" label="商品ID" align="center" width="100" />
|
|
||||||
<el-table-column prop="goodsSpuName" label="商品名称" align="center" width="100" />
|
|
||||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" width="100" />
|
|
||||||
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" width="100" />
|
|
||||||
<el-table-column prop="unit" label="单位" align="center" width="80" />
|
|
||||||
<el-table-column prop="warehouseName" label="仓库" min-width="100" />
|
|
||||||
<el-table-column prop="warehouseRackCode" label="库位" width="100" />
|
|
||||||
<el-table-column prop="billNo" label="来源单号" align="center" width="100" />
|
|
||||||
<el-table-column prop="createTime" label="发生时间" align="center" width="120" />
|
|
||||||
<el-table-column prop="billType" label="单据类型" align="center" width="100" />
|
|
||||||
<el-table-column prop="busTypeValue" label="业务类型" align="center" width="100" />
|
|
||||||
<el-table-column prop="billObjName" label="客户/供应商" align="center" width="150" />
|
|
||||||
<el-table-column prop="batchNumber" label="批次号" align="center" width="100" />
|
|
||||||
<el-table-column prop="count" label="数量" align="center" width="140" />
|
|
||||||
<el-table-column prop="currentCount" label="出入库后的库存" width="80" />
|
|
||||||
</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/storage/inventory'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'InventoryRefer',
|
|
||||||
components: {
|
|
||||||
Pagination,
|
|
||||||
pageye,
|
|
||||||
ButtonBar
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
btndisabled: false,
|
|
||||||
btnList: [
|
|
||||||
{
|
|
||||||
type: 'primary',
|
|
||||||
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: 5,
|
|
||||||
total: 0,
|
|
||||||
params: {
|
|
||||||
goodsID: '',
|
|
||||||
billNo: '',
|
|
||||||
billType: '',
|
|
||||||
busTypeValue: '',
|
|
||||||
billObjName: '',
|
|
||||||
batchNumber: '',
|
|
||||||
goodsSpuName: '',
|
|
||||||
goodsSkuCode: '',
|
|
||||||
warehouseName: '',
|
|
||||||
warehouseRackCode: '',
|
|
||||||
createTimeStart: '',
|
|
||||||
createTimeEnd: ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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.pageList(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: 5,
|
|
||||||
total: 0,
|
|
||||||
params: {
|
|
||||||
goodsID: '',
|
|
||||||
billNo: '',
|
|
||||||
billType: '',
|
|
||||||
busTypeValue: '',
|
|
||||||
billObjName: '',
|
|
||||||
batchNumber: '',
|
|
||||||
goodsSpuName: '',
|
|
||||||
goodsSkuCode: '',
|
|
||||||
warehouseName: '',
|
|
||||||
warehouseRackCode: '',
|
|
||||||
createTimeStart: '',
|
|
||||||
createTimeEnd: ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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,322 +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-date-picker v-model="queryParams.params.createDateStart" @change="selectTime1" 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-date-picker v-model="queryParams.params.createDateEnd" @change="selectTime2" type="date"
|
|
||||||
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
|
||||||
</el-date-picker>
|
|
||||||
</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 prop="billNo" label="单据编号" align="center" />
|
|
||||||
<el-table-column prop="createDate" label="单据日期" align="center" />
|
|
||||||
<el-table-column prop="createByName" label="制单人姓名" align="center" />
|
|
||||||
<el-table-column prop="checkStateName" label="盘点状态" align="center" />
|
|
||||||
<el-table-column prop="completeDate" label="完成时间" align="center" />
|
|
||||||
<el-table-column prop="createOrgName" label="门店" align="center" />
|
|
||||||
<el-table-column prop="profitCount" label="盘盈数量" align="center" />
|
|
||||||
<el-table-column prop="profitAmount" label="盘盈金额" align="center" />
|
|
||||||
<el-table-column prop="lossCount" label="盘亏数量" align="center" />
|
|
||||||
<el-table-column prop="lossAmount" 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/storage/stocktaking.js'
|
|
||||||
import ButtonBar from '@/components/ButtonBar'
|
|
||||||
import Pagination from '@/components/pagination'
|
|
||||||
import pageye from '@/components/pagination/pageye'
|
|
||||||
import divAdd from './stocktakingAdd.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: '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: {
|
|
||||||
"createDateStart": "",
|
|
||||||
"createDateEnd": "",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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
|
|
||||||
},
|
|
||||||
selectTime1() {
|
|
||||||
|
|
||||||
},
|
|
||||||
selectTime2() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
dosearch() {
|
|
||||||
this.queryParams.current = 1
|
|
||||||
this.loadList()
|
|
||||||
},
|
|
||||||
resetQuery() {
|
|
||||||
this.queryParams = {
|
|
||||||
current: 1,
|
|
||||||
size: 10,
|
|
||||||
total: 0,
|
|
||||||
params: {
|
|
||||||
"createDateStart": "",
|
|
||||||
"createDateEnd": "",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.loadList()
|
|
||||||
},
|
|
||||||
toAdd() {
|
|
||||||
this.viewState = 2
|
|
||||||
this.$refs['divadd'].showAdd()
|
|
||||||
},
|
|
||||||
selectionLineChangeHandle(val) {
|
|
||||||
console.log("val", val);
|
|
||||||
|
|
||||||
this.selectionList = val
|
|
||||||
|
|
||||||
},
|
|
||||||
toEdit(){
|
|
||||||
if(this.selectionList.length!=1){
|
|
||||||
this.$message({
|
|
||||||
type: 'warning',
|
|
||||||
message: "请选择一条数据。",
|
|
||||||
showClose: true
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.selectionList[0].checkState!=1){
|
|
||||||
this.$message({
|
|
||||||
type: 'warning',
|
|
||||||
message: "此记录已完成,不可重复编辑。",
|
|
||||||
showClose: true
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.viewState = 3
|
|
||||||
this.$refs['divadd'].showEdit(this.selectionList[0])
|
|
||||||
},
|
|
||||||
toBuild() {
|
|
||||||
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 = '出入库明细_' + this.queryParams.params.createDateStart + '.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)
|
|
||||||
},
|
|
||||||
|
|
||||||
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,412 +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="primary" size="small" :disabled="submitdisabled" @click="settle()">盘点</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
|
|
||||||
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;padding: 10px;">
|
|
||||||
<div>商品列表</div>
|
|
||||||
<div v-if="formobj.billNo!=''">单号:{{formobj.billNo}}</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<el-table :key="commodityKey" :data="formobj.wmsInventoryCheckbillDetailList" :index="index" border
|
|
||||||
style="width: 100%;">
|
|
||||||
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
|
|
||||||
<el-table-column align="center" width="70" :render-header="commodityHeader">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<i class="el-icon-delete" @click="commodityDelete(scope.$index)"></i>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="商品名称" align="center" min-width="200">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-popover placement="right" width="900" trigger="click">
|
|
||||||
<div>
|
|
||||||
<el-table :data="commodityData" v-loading="commodityLoading" highlight-current-row
|
|
||||||
@current-change="commodityCurrentChange($event, scope.row)">
|
|
||||||
<el-table-column fixed prop="goodsSpuName" label="商品名称" align="center" />
|
|
||||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
|
|
||||||
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" />
|
|
||||||
<el-table-column prop="unit" label="单位" align="center" />
|
|
||||||
<el-table-column prop="warehouseName" label="仓库" align="center" />
|
|
||||||
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
|
|
||||||
<el-table-column prop="count" label="账面数量" align="center" />
|
|
||||||
</el-table>
|
|
||||||
<el-pagination :page.sync="commodityQuery.current" :page-size="commodityQuery.size"
|
|
||||||
layout="total, pager" :total="commodityQuery.total" />
|
|
||||||
</div>
|
|
||||||
<el-input slot="reference" v-model="scope.row.goodsSpuName"
|
|
||||||
@input="commodityInput(scope.row.goodsSpuName)" clearable placeholder="商品名称" />
|
|
||||||
</el-popover>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
|
|
||||||
<el-table-column prop="carModel" label="型号" align="center" />
|
|
||||||
<el-table-column prop="unit" label="单位" align="center" />
|
|
||||||
<el-table-column prop="warehouseName" label="仓库" align="center" />
|
|
||||||
<el-table-column prop="warehouseRackCode" label="货位" align="center" />
|
|
||||||
<el-table-column prop="taxPrice" label="单价" align="center" />
|
|
||||||
<el-table-column prop="bookCount" label="账面数量" align="center" />
|
|
||||||
<el-table-column label="实盘数量" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE(scope.row,$event)"
|
|
||||||
v-model="scope.row.realCount" clearable placeholder=""
|
|
||||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="state" label="状态" align="center" width="100" />
|
|
||||||
<el-table-column prop="profitandlossNumber" label="盈亏数" align="center" width="100" />
|
|
||||||
<el-table-column prop="profitandlossAmount" label="盈亏金额" align="center" width="100" />
|
|
||||||
</el-table>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item><span>盘盈数量:{{ profitandNumber }} , 盘盈金额:{{ profitandPrice }} , 盘亏数量:{{ lossNumber }} ,
|
|
||||||
盘库金额:{{ lossPrice }}</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1">
|
|
||||||
<el-form-item><span>备注</span></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="23">
|
|
||||||
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="请填写备注..." /></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import req from '@/api/storage/stocktaking.js'
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
viewTitle: '',
|
|
||||||
viewState: 1,
|
|
||||||
submitdisabled: false,
|
|
||||||
settleVisible: false, //
|
|
||||||
activeNames: '1',
|
|
||||||
index: 0,
|
|
||||||
|
|
||||||
// commodity商品
|
|
||||||
commodityKey: 1,
|
|
||||||
commodityLoading: false,
|
|
||||||
commodityQuery: {
|
|
||||||
current: 1,
|
|
||||||
size: 2,
|
|
||||||
total: 0,
|
|
||||||
params: {
|
|
||||||
name: ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
commodityData: [],
|
|
||||||
formobj: {
|
|
||||||
"sid": "",
|
|
||||||
"remarks": "",
|
|
||||||
"billNo": "",
|
|
||||||
"createBySid": window.sessionStorage.getItem('userSid'),
|
|
||||||
"createByName":window.sessionStorage.getItem('name'),
|
|
||||||
"createDate": "",
|
|
||||||
"createUserSid": window.sessionStorage.getItem('userSid'),
|
|
||||||
"checkType": "",
|
|
||||||
"profitAmount": "",
|
|
||||||
"lossCount": "",
|
|
||||||
"lossAmount": "",
|
|
||||||
"useOrgSid": window.sessionStorage.getItem('orgSid'),
|
|
||||||
"createOrgSid": window.sessionStorage.getItem('orgSid'),
|
|
||||||
"wmsInventoryCheckbillDetailList": [
|
|
||||||
|
|
||||||
]
|
|
||||||
},
|
|
||||||
rules: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
// 计算盘盈数量
|
|
||||||
profitandNumber() {
|
|
||||||
let quantity = 0
|
|
||||||
if (this.formobj.wmsInventoryCheckbillDetailList.length > 0) {
|
|
||||||
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => {
|
|
||||||
if (Number(e.bookCount) < Number(e.realCount)) {
|
|
||||||
quantity += e.realCount - e.bookCount
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.formobj.profitCount = quantity
|
|
||||||
return quantity
|
|
||||||
},
|
|
||||||
// 计算盘盈金额
|
|
||||||
profitandPrice() {
|
|
||||||
let material = 0
|
|
||||||
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => {
|
|
||||||
if (Number(e.bookCount) < Number(e.realCount)) {
|
|
||||||
material += (e.realCount - e.bookCount) * e.taxPrice
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.formobj.profitAmount = material.toFixed(2)
|
|
||||||
return material.toFixed(2)
|
|
||||||
},
|
|
||||||
// 计算盘亏数量
|
|
||||||
lossNumber() {
|
|
||||||
let quantity = 0
|
|
||||||
if (this.formobj.wmsInventoryCheckbillDetailList.length > 0) {
|
|
||||||
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => {
|
|
||||||
if (Number(e.bookCount) > Number(e.realCount)) {
|
|
||||||
quantity += e.realCount - e.bookCount
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
this.formobj.lossCount = quantity
|
|
||||||
|
|
||||||
return quantity
|
|
||||||
},
|
|
||||||
// 计算盘亏金额
|
|
||||||
lossPrice() {
|
|
||||||
let material = 0
|
|
||||||
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => {
|
|
||||||
if (Number(e.bookCount) > Number(e.realCount)) {
|
|
||||||
material += (e.realCount - e.bookCount) * e.taxPrice
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
this.formobj.lossAmount = material.toFixed(2)
|
|
||||||
|
|
||||||
return material.toFixed(2)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
showAdd() {
|
|
||||||
this.viewTitle = '【新增】盘点记录'
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['form_obj'].clearValidate()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
showEdit(row) {
|
|
||||||
this.viewTitle = '【修改】盘点记录'
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['form_obj'].clearValidate()
|
|
||||||
})
|
|
||||||
req.init(row.sid).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.formobj = res.data
|
|
||||||
|
|
||||||
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => {
|
|
||||||
this.commodityComputeYHAndXSJE(e, e.realCount)
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 在头部标题上添加“新增”图标
|
|
||||||
commodityHeader(h, {
|
|
||||||
column
|
|
||||||
}) {
|
|
||||||
return h(
|
|
||||||
'div',
|
|
||||||
[
|
|
||||||
h('span', column.label),
|
|
||||||
h('i', {
|
|
||||||
class: 'add-btn-icon el-icon-plus',
|
|
||||||
style: 'color: red;font-size:20px',
|
|
||||||
on: {
|
|
||||||
click: this.commodityAdd // 点击执行函数
|
|
||||||
}
|
|
||||||
})
|
|
||||||
]
|
|
||||||
)
|
|
||||||
},
|
|
||||||
commodityAdd() {
|
|
||||||
this.formobj.wmsInventoryCheckbillDetailList.push({
|
|
||||||
"sid": "",
|
|
||||||
"state": "",
|
|
||||||
"billSid": "",
|
|
||||||
"inventorySid": "",
|
|
||||||
"warehouseSid": "",
|
|
||||||
"warehouseName": "",
|
|
||||||
"warehouseRackSid": "",
|
|
||||||
"warehouseRackCode": "",
|
|
||||||
"taxPrice": "",
|
|
||||||
"bookCount": "",
|
|
||||||
"realCount": "",
|
|
||||||
"profitandlossNumber": "",
|
|
||||||
"profitandlossAmount": "",
|
|
||||||
"picUrl": ""
|
|
||||||
})
|
|
||||||
},
|
|
||||||
commodityInput(value) {
|
|
||||||
this.commodityQuery.params.name = value
|
|
||||||
this.commodityLoading = true
|
|
||||||
req.getWarehousesGoods(this.commodityQuery).then((response) => {
|
|
||||||
if (response.success) {
|
|
||||||
this.commodityLoading = false
|
|
||||||
this.commodityData = response.data.records
|
|
||||||
this.commodityQuery.total = response.data.total
|
|
||||||
} else {
|
|
||||||
this.commodityLoading = false
|
|
||||||
this.commodityData = []
|
|
||||||
this.commodityQuery.total = 0
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
commodityDelete(index) {
|
|
||||||
this.formobj.wmsInventoryCheckbillDetailList.splice(index, 1)
|
|
||||||
},
|
|
||||||
commodityCurrentChange(value, row) {
|
|
||||||
row.sid = value.sid
|
|
||||||
row.goodsName = value.goodsSpuName
|
|
||||||
row.goodsSkuCode = value.goodsSkuCode
|
|
||||||
row.goodsSkuOwnSpec = value.goodsSkuOwnSpec
|
|
||||||
row.unit = value.unit
|
|
||||||
row.warehouseName = value.warehouseName
|
|
||||||
row.warehouseSid = value.warehouseSid
|
|
||||||
row.warehouseRackCode = value.warehouseRackCode
|
|
||||||
row.bookCount = value.count
|
|
||||||
row.taxPrice = value.salesPrice
|
|
||||||
row.realCount = ""
|
|
||||||
row.profitandlossNumber = ""
|
|
||||||
row.profitandlossAmount = ""
|
|
||||||
document.body.click()
|
|
||||||
},
|
|
||||||
// 计算状态 盈亏数量 盈亏金额
|
|
||||||
commodityComputeYHAndXSJE(row, val) {
|
|
||||||
|
|
||||||
console.log("aaa", row);
|
|
||||||
console.log("aaa", val);
|
|
||||||
|
|
||||||
// 正常
|
|
||||||
if (Number(row.bookCount) == Number(val)) {
|
|
||||||
row.state = "正常"
|
|
||||||
row.profitandlossNumber = "0"
|
|
||||||
row.profitandlossAmount = "0.00"
|
|
||||||
}
|
|
||||||
|
|
||||||
// 盘盈
|
|
||||||
if (Number(row.bookCount) < Number(val)) {
|
|
||||||
row.state = "盘盈"
|
|
||||||
row.profitandlossNumber = val - row.bookCount
|
|
||||||
row.profitandlossAmount = ((val - row.bookCount) * row.taxPrice).toFixed(2)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 盘亏
|
|
||||||
if (Number(row.bookCount) > Number(val)) {
|
|
||||||
row.state = "盘亏"
|
|
||||||
row.profitandlossNumber = val - row.bookCount
|
|
||||||
row.profitandlossAmount = ((val - row.bookCount) * row.taxPrice).toFixed(2)
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
saveOrUpdate() {
|
|
||||||
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
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
settle() {
|
|
||||||
|
|
||||||
this.$refs['form_obj'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.submitdisabled = true
|
|
||||||
req.inven(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
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
confirm() {
|
|
||||||
this.$refs['form_obj'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.submitdisabled = true
|
|
||||||
req.settlement(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": "",
|
|
||||||
"remarks": "",
|
|
||||||
"createBySid": "",
|
|
||||||
"createDate": "",
|
|
||||||
"createUserSid": "",
|
|
||||||
"createByName": "",
|
|
||||||
"checkType": "",
|
|
||||||
"checkState": "",
|
|
||||||
"profitCount": "",
|
|
||||||
"profitAmount": "",
|
|
||||||
"lossCount": "",
|
|
||||||
"lossAmount": "",
|
|
||||||
"useOrgSid": "",
|
|
||||||
"createOrgName": "",
|
|
||||||
"createOrgSid": "",
|
|
||||||
"wmsInventoryCheckbillDetailList": []
|
|
||||||
}
|
|
||||||
this.submitdisabled = false
|
|
||||||
this.settleVisible = 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);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Reference in New Issue
Block a user