
114 changed files with 222 additions and 32305 deletions
@ -1,87 +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' |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 库位-- 删除
|
|
||||
deleteBySids: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehouserack/delBySids', |
|
||||
method: 'DELETE', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 查询所有库位列表
|
|
||||
warehouserackListAll: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehouserack/listAll', |
|
||||
method: 'post', |
|
||||
data: params, |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 根据仓库查询库位
|
|
||||
getWarehouseareas: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehouserack/selectAll', |
|
||||
method: 'get', |
|
||||
params: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
// 根据库区查询库位
|
|
||||
getAllTypeByAreaSid: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehouserack/getAllTypeByAreaSid', |
|
||||
method: 'get', |
|
||||
params: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,55 +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, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
} |
|
@ -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,70 +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' |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 仓库-- 删除
|
|
||||
deleteBySids: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehouseinfo/delBySids', |
|
||||
method: 'DELETE', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,88 +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' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 根据仓库sid查询库区
|
|
||||
getAllWarehouseareaBysid: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin//warehousearea/selectAll', |
|
||||
method: 'get', |
|
||||
params: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
// 根据区域sid查询库区
|
|
||||
getAllWarehouseareaByZoneSid: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehousearea/selectAreaAll', |
|
||||
method: 'get', |
|
||||
params: 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' |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 库区-- 删除
|
|
||||
deleteBySids: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehousearea/delBySids', |
|
||||
method: 'DELETE', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,67 +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' |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 库区类型-- 删除
|
|
||||
deleteBySids: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehouseareatype/delBySids', |
|
||||
method: 'DELETE', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,84 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
// 仓库区域 接口
|
|
||||
export default { |
|
||||
|
|
||||
// 查询分页列表
|
|
||||
listPage: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehousezone/listPage', |
|
||||
method: 'post', |
|
||||
data: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 区域查询
|
|
||||
getAllWarehousezone: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehousezone/listAll', |
|
||||
method: 'post', |
|
||||
data: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
// 根据仓库sid查询区域
|
|
||||
getAllWarehousezoneBysid: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehousezone/selectAll', |
|
||||
method: 'get', |
|
||||
params: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
// 修改是否可用状态
|
|
||||
updateIsEnable: function(sid, isEnable) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehousezone/updateIsEnable/' + sid + "/" + isEnable |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
// 新增、保存
|
|
||||
saveWarehousezone: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehousezone/saveOrUpdate', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 初始化
|
|
||||
initWarehousezone: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehousezone/initialization/' + data, |
|
||||
method: 'get' |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
// 区域-- 删除
|
|
||||
deleteBySids: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehousezone/delBySids', |
|
||||
method: 'DELETE', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
} |
|
@ -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,94 +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' |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 商品规格 修改是否可用状态
|
|
||||
updateIsEnable2: function(sid, isEnable) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/base/basegoodsspu/updateIsEnablebySku/' + sid + "/" + isEnable |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
|
|
||||
// 商品-- 删除
|
|
||||
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' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 查询商品分页列表
|
|
||||
getGoodsListAllByOrg: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/basegoodssku/listAllByOrg', |
|
||||
// url: '/wms/apiadmin/base/basegoodsspu/goodsListPage',
|
|
||||
method: 'post', |
|
||||
data: params, |
|
||||
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,122 +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'
|
|
||||
// }
|
|
||||
// });
|
|
||||
// },
|
|
||||
|
|
||||
|
|
||||
|
|
||||
// 入库预约
|
|
||||
|
|
||||
// 查询发货人信息
|
|
||||
fetchDetailsBySid: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/supplierinfo/fetchDetailsByBillSid/' + data, |
|
||||
method: 'get', |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 查询商品明细信息
|
|
||||
selectByBillSid: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/wmsansbilldetails/selectByBillSid/' + data, |
|
||||
method: 'get', |
|
||||
|
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 查询操作记录信息
|
|
||||
operationrecordDetails: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/operationrecord/details', |
|
||||
method: 'get', |
|
||||
params: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 修改库区
|
|
||||
updateRack: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/WmsAnsBill/updateRack', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 修改备注
|
|
||||
updateRemarks: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/WmsAnsBill/updateRemarks', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,43 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
|
|
||||
export default { |
|
||||
|
|
||||
// 查询分页列表
|
|
||||
listPage: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/purchaseinventorybill/listPage', |
|
||||
method: 'post', |
|
||||
data: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 查询商品
|
|
||||
getGoodsSelectList: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/basegoodssku/getSelectList', |
|
||||
method: 'post', |
|
||||
data: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
// 保存验货入库
|
|
||||
saveInspection: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/purchaseinventorybill/inspectionWarehousing', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,154 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
|
|
||||
export default { |
|
||||
|
|
||||
//采购入库
|
|
||||
// 入库单列表
|
|
||||
listPage: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/purchaseinventorybill/listPage', |
|
||||
method: 'post', |
|
||||
data: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 根据入库单sid获取明细
|
|
||||
selectByBillSid: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/purchaseinventorybill/selectByBillSid/' + data, |
|
||||
method: 'get' |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 获取组织下所有的预约单
|
|
||||
getReservationBill: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/WmsAnsBill/listPageAns', |
|
||||
method: 'post', |
|
||||
data: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
// 生成入库单
|
|
||||
createInStorageBill: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/purchaseinventorybill/confirm', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
|
|
||||
// // 查询分页列表
|
|
||||
// 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,288 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
|
|
||||
export default { |
|
||||
|
|
||||
// 查询分页列表
|
|
||||
listPage: function(params) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseoutbill/listPage', |
|
||||
method: 'post', |
|
||||
data: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 修改承运商
|
|
||||
updateCarrier: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseoutbill/updateCarrier', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 修改运单号
|
|
||||
updateWaybillNumber: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseoutbill/updateWaybillNumber', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
// 订单商品明细
|
|
||||
orderGoodsDetail: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseoutbilldetail/selectDetailsByBillSid', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 库位分配
|
|
||||
orderRackDistributionDetail: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseoutlocation/details', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 收货地址
|
|
||||
orderReceivingAddressDetail: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseoutbill/getAddresseeBySid', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 发票明细
|
|
||||
orderInvoiveDetail: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseinvoice/details', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 保存发票明细
|
|
||||
saveOrderInvoive: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseinvoice/saveOrUpdate', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 备注/留言
|
|
||||
orderRemarksDetail: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseinvoice/details', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 操作记录
|
|
||||
orderOperationDetail: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/operationrecord/details', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 查询商品可用库位分配
|
|
||||
selAvailableBySkuSid: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseinventory/selAvailableBySkuSid', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 保存商品可用库位分配
|
|
||||
saveSelAvailable: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseoutlocation/saveOrUpdate', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
// 打到零拣 --> 零拣打单
|
|
||||
toBePickOut: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseoutbill/toBePickOut', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 撤回待分配 -->待分配
|
|
||||
toBeAllocated: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseoutbill/toBeAllocated', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 确认打单-->待出库
|
|
||||
toBeOutbound: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseoutbill/toBeOutbound', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 待出库-->确认出库
|
|
||||
confirmOutbound: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseoutbill/confirmOutbound', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// // 查询分页列表
|
|
||||
// listPage: function(params) {
|
|
||||
// return request({
|
|
||||
// url: '/wms/apiadmin/WmsOutBill/listPage',
|
|
||||
// method: 'post',
|
|
||||
// data: params,
|
|
||||
// headers: {
|
|
||||
// 'Content-Type': 'application/json'
|
|
||||
// }
|
|
||||
// })
|
|
||||
// },
|
|
||||
|
|
||||
// // 详情初始化
|
|
||||
// init: function(data) {
|
|
||||
// return request({
|
|
||||
// url: '/wms/apiadmin/WmsOutBill/details',
|
|
||||
// method: 'get',
|
|
||||
// data: data
|
|
||||
// });
|
|
||||
// },
|
|
||||
|
|
||||
// // 初始配货单
|
|
||||
// initDistribution: function(data) {
|
|
||||
// return request({
|
|
||||
// url: '/wms/apiadmin/WmsDistributeBill/getInit',
|
|
||||
// method: 'get',
|
|
||||
// data: data
|
|
||||
// });
|
|
||||
// },
|
|
||||
|
|
||||
|
|
||||
// // 新增、保存
|
|
||||
// save: function(data) {
|
|
||||
// return request({
|
|
||||
// url: '/wms/apiadmin/WmsOutBill/saveOrUpdateOutBill',
|
|
||||
// method: 'post',
|
|
||||
// data: data,
|
|
||||
// headers: {
|
|
||||
// 'Content-Type': 'application/json'
|
|
||||
// }
|
|
||||
// });
|
|
||||
// },
|
|
||||
|
|
||||
// // 确认
|
|
||||
// submit: function(data) {
|
|
||||
// return request({
|
|
||||
// url: '/wms/apiadmin/WmsOutBill/confirm',
|
|
||||
// method: 'post',
|
|
||||
// data: data,
|
|
||||
// headers: {
|
|
||||
// 'Content-Type': 'application/json'
|
|
||||
// }
|
|
||||
// });
|
|
||||
// },
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
// // 新增、保存 配货单
|
|
||||
// saveDistribution: function(data) {
|
|
||||
// return request({
|
|
||||
// url: '/wms/apiadmin/WmsDistributeBill/saveOrUpdateBill',
|
|
||||
// method: 'post',
|
|
||||
// data: data,
|
|
||||
// headers: {
|
|
||||
// 'Content-Type': 'application/json'
|
|
||||
// }
|
|
||||
// });
|
|
||||
// },
|
|
||||
|
|
||||
|
|
||||
// deleteBySids: function(data) {
|
|
||||
// return request({
|
|
||||
// url: '/wms/apiadmin/WmsShelfBill/delBySids',
|
|
||||
// method: 'DELETE',
|
|
||||
// data: data,
|
|
||||
// headers: {
|
|
||||
// 'Content-Type': 'application/json'
|
|
||||
// }
|
|
||||
// })
|
|
||||
// },
|
|
||||
|
|
||||
// // 查询分页列表
|
|
||||
// getGoodsListPage: function(params) {
|
|
||||
// return request({
|
|
||||
// url: '/wms/apiadmin/WmsOutBill/getInventoryList',
|
|
||||
// method: 'post',
|
|
||||
// data: params,
|
|
||||
// headers: {
|
|
||||
// 'Content-Type': 'application/json'
|
|
||||
// }
|
|
||||
// })
|
|
||||
// },
|
|
||||
|
|
||||
} |
|
@ -1,30 +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' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
} |
|
@ -1,18 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
// 历史库存 接口文档
|
|
||||
export default { |
|
||||
// 查询分页列表 -- 历史库存
|
|
||||
listPage: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseinventoryhistory/listPage', |
|
||||
method: 'post', |
|
||||
data: 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,61 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
// 库存调整 接口文档
|
|
||||
export default { |
|
||||
|
|
||||
// 查询分页列表
|
|
||||
listPage: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/inventoryadjustment/listPage', |
|
||||
method: 'post', |
|
||||
data: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 添加商品 查询分页列表
|
|
||||
selInventoryByWareSid: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehouseinventory/selInventoryByWareSid', |
|
||||
method: 'post', |
|
||||
data: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 保存调整单
|
|
||||
saveOrUpdate: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/inventoryadjustment/saveOrUpdate', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
// 初始化调整单
|
|
||||
init: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/inventoryadjustment/initialization/' + data, |
|
||||
method: 'get', |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 批量删除
|
|
||||
deleteBySids: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/inventoryadjustment/delBySids', |
|
||||
method: 'DELETE', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
} |
|
@ -1,31 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
// 区域预警 接口文档
|
|
||||
export default { |
|
||||
|
|
||||
// 查询分页列表
|
|
||||
listPage: function(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehouseinventory/areaWarningListPage', |
|
||||
method: 'post', |
|
||||
data: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 保存预警上下限
|
|
||||
updateLimit: function(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/warehouseareawarning/saveOrUpdate', |
|
||||
method: 'post', |
|
||||
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' } |
|
||||
}) |
|
||||
}, |
|
||||
} |
|
@ -1,43 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
// 库存总量 接口文档
|
|
||||
export default { |
|
||||
// 查询分页列表 -- 库存总量
|
|
||||
listPage: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseinventory/listPage', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 查询库存变化
|
|
||||
getWarehouseInventoryRecord: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseinventoryrecord/getWarehouseInventoryRecord', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 查询库区库存
|
|
||||
getRackCountBySid: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseinventory/getRackCountBySid', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
} |
|
@ -1,18 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
// 库位库存 接口文档
|
|
||||
export default { |
|
||||
// 查询分页列表 -- 库位库存
|
|
||||
listPage: function(data) { |
|
||||
return request({ |
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
|
||||
url: '/wms/apiadmin/warehouseinventory/locationListPage', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,44 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
const tokens = window.sessionStorage.getItem('token') |
|
||||
//
|
|
||||
export function rolemenus(data) { |
|
||||
return request({ |
|
||||
url: '/system/v1/rolemenus/' + data.roleSid, |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 获取左侧菜单
|
|
||||
export function getrolemenus(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysmenu/sourcemenutree', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: { 'Content-Type': 'application/json', |
|
||||
'token': tokens } |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 获取角色的主页菜单
|
|
||||
export function sourcesofrole(data) { |
|
||||
return request({ |
|
||||
url: '/system/v1/rolemenus/sourcesofrole', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: { 'Content-Type': 'application/json' } |
|
||||
}) |
|
||||
} |
|
||||
// 根据token值获取登录后的用户信息
|
|
||||
export function loginDetails(data) { |
|
||||
return request({ |
|
||||
baseURL: '/api', |
|
||||
url: '/portal/v1/sysuser/loginDetails', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
} |
|
@ -1,32 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
//获取单位级别
|
|
||||
export function getDwJb(data) { |
|
||||
return request({ |
|
||||
url: '/system/dictCommon/getDwJb', |
|
||||
method: 'GET', |
|
||||
}) |
|
||||
} |
|
||||
// 获取机构单位类别
|
|
||||
export function getDwType(data) { |
|
||||
return request({ |
|
||||
url: '/system/dictCommon/getDwType', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
//获取机构人员类别
|
|
||||
export function getRylb(data) { |
|
||||
return request({ |
|
||||
url: '/system/dictCommon/getRylb', |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 根据Type值获取数据对象
|
|
||||
export function getDicts(typeCode) { |
|
||||
return request({ |
|
||||
url: '/system/dictCommon/dicts/'+typeCode, |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
@ -1,125 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
|
|
||||
// let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
|
||||
let tokens = window.sessionStorage.getItem('token') |
|
||||
// 获取菜单 分页列表
|
|
||||
export function pageList(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysorganization/listPage', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json', |
|
||||
'token': tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 查询左侧部门列表
|
|
||||
export function orgList(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysorganization/list/' + data, |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json', |
|
||||
'token': tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 编辑部门信息
|
|
||||
export function postOrgtree(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysorganization/update/' + data.sid, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json', |
|
||||
'token': tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 获取 机构分页列表(编辑部门信息)
|
|
||||
export function putOrgtree(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysorganization/update/' + data.sid, |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json', |
|
||||
'token': tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 新增部门信息
|
|
||||
export function addOrgTree(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysorganization/save', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json', |
|
||||
'token': tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 回显
|
|
||||
export function selectBySid(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysorganization/fetchBySid/' + data, |
|
||||
method: 'get', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json', |
|
||||
'token': tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 树 节点名称 删除
|
|
||||
export function delOrgtree(data) { |
|
||||
return request({ |
|
||||
url: `/wms/apiadmin/sysorganization/delBySid/` + data.sid, |
|
||||
method: 'get', |
|
||||
data: qs.stringify(data), |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json', |
|
||||
'token': tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 查询主管人员 旧的:/wms/apiadmin/sysstafforg/staffinfoList
|
|
||||
export function getStaff(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysstaffinfo/getStaffNameByDeptSid', |
|
||||
method: 'get', |
|
||||
params: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json', |
|
||||
'token': tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 查询分管人员
|
|
||||
export function getStaffName(params) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysstaffinfo/getStaffName', |
|
||||
method: 'get', |
|
||||
params: params, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json', |
|
||||
'token': tokens |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
// 查看二维码
|
|
||||
export function getQrCode(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysorganization/getQrCode/' + data.sid, |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
} |
|
@ -1,31 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
|
|
||||
/** |
|
||||
* < 业务角色授权时菜单列表(拥有的菜单选中)> |
|
||||
* @orgTypeKeys 单位性质(类别 |
|
||||
* @roleSid 业务角色sid |
|
||||
* @userType 用户类型只能为1或2 |
|
||||
* */ |
|
||||
export function roleMenuTree(data){ |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/orgrolemenus/menutree', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* < 保存角色授权的菜单项 > |
|
||||
* @roleMenus[] 角色权限列表 {menuSid 菜单sid} {orgSid 单位sid} {roleSid 角色sid} |
|
||||
* @roleSid 业务角色sid |
|
||||
* */ |
|
||||
export function saveorgrolemenus(data){ |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/orgrolemenus', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json'} |
|
||||
}) |
|
||||
} |
|
@ -1,38 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
import qs from 'qs' |
|
||||
|
|
||||
|
|
||||
//获取菜单 分页列表
|
|
||||
export function login1(data) { |
|
||||
return request({ |
|
||||
url: '/portal/v1/sysuser/login', |
|
||||
method: 'POST', |
|
||||
data: data, |
|
||||
headers: {'Content-Type': 'application/json', |
|
||||
// 'token':tokens
|
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
class user { |
|
||||
login(data) { // 登录
|
|
||||
return request({ |
|
||||
url: '/portal/v1/sysuser/login', |
|
||||
method: 'post', |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
logout() { // 退出
|
|
||||
return request({ |
|
||||
url: '/vue-admin-template/user/logout', |
|
||||
method: 'post' |
|
||||
}) |
|
||||
} |
|
||||
updatePassword(data) { // 退出修改密码
|
|
||||
return request({ |
|
||||
url: '/system/user/updatePassword', |
|
||||
method: 'post', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
||||
} |
|
@ -1,108 +0,0 @@ |
|||||
import request from '@/utils/request' |
|
||||
// eslint-disable-next-line no-unused-vars
|
|
||||
import qs from 'qs' |
|
||||
|
|
||||
// 登录
|
|
||||
export function doLogin(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysuser/login', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 注册发送验证码
|
|
||||
export function registerSendMessageCode(code) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysuser/sendMessageCode/?mobile=' + code, |
|
||||
method: 'post', |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
} |
|
||||
|
|
||||
// 用户注册
|
|
||||
export function registUser(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysuser/register', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
// 绑定企业/组织
|
|
||||
export function bindOrganization(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysuser/bindOrganization', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
// 选择企业/组织sid
|
|
||||
export function selOrganization(data) { |
|
||||
return request({ |
|
||||
url: '/wms/apiadmin/sysuser/selOrganization', |
|
||||
method: 'post', |
|
||||
data: data, |
|
||||
headers: { |
|
||||
'Content-Type': 'application/json' |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
// 获取登录人员信息
|
|
||||
export function getUserById(sid) { |
|
||||
return request({ |
|
||||
url: '/cyf/sys/getUserById/' + sid |
|
||||
}) |
|
||||
|
|
||||
} |
|
||||
|
|
||||
|
|
||||
// 获取手机验证码
|
|
||||
export function getVerificationCode(data) { |
|
||||
return request({ |
|
||||
url: '/system/user/getVerificationCode', |
|
||||
method: 'get', |
|
||||
params: data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 获取登录验证码
|
|
||||
export function imgCode() { |
|
||||
return request({ |
|
||||
url: '/system/api/defaultBlendCode?temm=' + new Date().getTime(), |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
// 获取用信息
|
|
||||
export function getInfo(token) { |
|
||||
return request({ |
|
||||
url: '/system/user/loginDetails', |
|
||||
method: 'post' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function logout(data) { // 退出
|
|
||||
return request({ |
|
||||
url: '/portal/v1/sysuser/signOut', |
|
||||
method: 'post', |
|
||||
data: qs.stringify(data) |
|
||||
}) |
|
||||
} |
|
@ -1,205 +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: 'accountType' |
|
||||
}).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,282 +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 |
|
||||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|
||||
this.listQuery.params.orgPath = window.sessionStorage.getItem('orgSidPath') |
|
||||
this.listQuery.params.menuUrl = this.$route.path |
|
||||
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,552 +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 v-model="formobj.supplierName" class="addinputInfo addinputw" |
|
||||
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 v-model="formobj.supplierPY" class="addinputInfo addinputw" |
|
||||
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 v-model="formobj.supplierCode" class="addinputInfo addinputw" |
|
||||
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 v-model="formobj.supplierTypeSid" class="addinputInfo" 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 v-model="formobj.contactTelePhone" |
|
||||
class="addinputInfo addinputw" clearable placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">传真</div> |
|
||||
<el-form-item><el-input v-model="formobj.fax" class="addinputInfo addinputw" 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 v-model="formobj.address" style="width: 30%" 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 v-model="formobj.contactName" class="addinputInfo addinputw" clearable |
|
||||
placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">联系电话</div> |
|
||||
<el-form-item><el-input v-model="formobj.contactMobile" class="addinputInfo addinputw" clearable |
|
||||
placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8" /> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">邮编</div> |
|
||||
<el-form-item><el-input v-model="formobj.zipCode" class="addinputInfo addinputw" clearable |
|
||||
placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">电子邮件</div> |
|
||||
<el-form-item><el-input v-model="formobj.email" class="addinputInfo addinputw" clearable |
|
||||
placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">网址</div> |
|
||||
<el-form-item><el-input v-model="formobj.website" class="addinputInfo addinputw" 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 v-model="formobj.billingCompanyName" |
|
||||
class="addinputInfo addinputw" clearable placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">税号</div> |
|
||||
<el-form-item><el-input v-model="formobj.registNum" class="addinputInfo addinputw" clearable |
|
||||
placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">法人</div> |
|
||||
<el-form-item><el-input v-model="formobj.legalName" class="addinputInfo addinputw" 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 v-model="formobj.purchaser" class="addinputInfo addinputw" clearable |
|
||||
placeholder="" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">开票类型</div> |
|
||||
<el-form-item> |
|
||||
<el-select v-model="formobj.billingTypeValue" class="addinputInfo" 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">税率</div> |
|
||||
<el-form-item><el-input v-model="formobj.taxRate" class="addinputInfo addinputw" clearable placeholder="" |
|
||||
@keyup.native="formobj.taxRate = getNumber(formobj.taxRate, 2)" /></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" class="addinputInfo addinputw" 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: '', |
|
||||
createOrgName: '', |
|
||||
createOrgSid: '', |
|
||||
taxRate: '', |
|
||||
remarks: '', |
|
||||
baseSupplierBankList: [], |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
}, |
|
||||
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' |
|
||||
}], |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
methods: { |
|
||||
init() { |
|
||||
typeValues({ |
|
||||
type: 'billingType' |
|
||||
}).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('orgSid') |
|
||||
}).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 |
|
||||
|
|
||||
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 |
|
||||
// } |
|
||||
|
|
||||
this.$set(this.formobj.baseSupplierBankList, index, value) |
|
||||
} 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: '', |
|
||||
createOrgName: '', |
|
||||
createOrgSid: '', |
|
||||
taxRate: '', |
|
||||
remarks: '', |
|
||||
baseSupplierBankList: [], |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
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,238 +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.baseSupplierBankList" :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: '', |
|
||||
baseSupplierBankList: [] |
|
||||
}, |
|
||||
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: '', |
|
||||
baseSupplierBankList: [] |
|
||||
} |
|
||||
this.$emit('doback') |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
.span-sty { |
|
||||
width: 130px !important; |
|
||||
} |
|
||||
|
|
||||
.addinputInfo { |
|
||||
margin-left: 120px !important; |
|
||||
} |
|
||||
</style> |
|
@ -1,328 +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: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
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.userSid = window.sessionStorage.getItem('userSid') |
|
||||
this.listQuery.params.orgPath = window.sessionStorage.getItem('orgSidPath') |
|
||||
this.listQuery.params.menuUrl = this.$route.path |
|
||||
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: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
}, |
|
||||
toEdit(row) { |
|
||||
this.dialogVisible = true |
|
||||
this.formobj = { |
|
||||
sid: row.sid, |
|
||||
supplierTypeName: row.supplierTypeName, |
|
||||
supplierTypeCode: row.supplierTypeCode, |
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
}, |
|
||||
handleConfirm() { |
|
||||
if (this.formobj.supplierTypeName === '' || this.formobj.supplierTypeCode === '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'error', |
|
||||
message: '供应商类型或编码不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
||||
this.formobj.orgSid = window.sessionStorage.getItem('orgSid') |
|
||||
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,328 +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 class="must">*</span> 所属仓库:</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 class="must">*</span> 所属区域:</span> |
|
||||
<el-select v-model="formobj.zoneName" placeholder="请选择所属区域" class="item_input" |
|
||||
@change="selectWarehouseZoneChange"> |
|
||||
<el-option v-for="item in warehouseZoneList" :key="item.sid" :label="item.zoneName" :value="item.sid" /> |
|
||||
</el-select> |
|
||||
</div> |
|
||||
<div class="item"> |
|
||||
<span class="item_text"><span class="must">*</span> 所属库区:</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 class="must">*</span> 库位编码:</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' |
|
||||
import req4 from '@/api/baseinfo/warehouseZone/warehouseZone.js' |
|
||||
export default { |
|
||||
components: {}, |
|
||||
data() { |
|
||||
return { |
|
||||
submitdisabled: false, |
|
||||
formobj: { |
|
||||
sid: '', |
|
||||
rackName: '', |
|
||||
rackCode: '', |
|
||||
warehouseName: '', |
|
||||
warehouseSid: '', |
|
||||
zoneName: '', |
|
||||
zoneSid: '', |
|
||||
locationName: '', |
|
||||
locationSid: '', |
|
||||
remarks: '', |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
}, |
|
||||
warehouseList: [], |
|
||||
warehouseAreaList: [], |
|
||||
warehouseZoneList: [] |
|
||||
} |
|
||||
}, |
|
||||
created() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
initData() { |
|
||||
var parpams = { |
|
||||
orgPath: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
req2.getAllWarehouse(parpams).then(resp => { |
|
||||
this.warehouseList = resp.data |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
saveOrUpdate() { |
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
|
||||
|
|
||||
if (this.formobj.warehouseName == '' || this.formobj.warehouseSid == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '所属仓库不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
if (this.formobj.zoneName == '' || this.formobj.zoneSid == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '所属区域不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
if (this.formobj.locationName == '' || this.formobj.locationSid == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '所属库区不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
if (this.formobj.rackCode == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '库位编码不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
this.submitdisabled = true |
|
||||
req.saveGoodsShelves(this.formobj) |
|
||||
.then(resp => { |
|
||||
if (resp.success) { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'success', |
|
||||
message: resp.msg |
|
||||
}) |
|
||||
this.handleReturn('true') |
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
this.submitdisabled = false |
|
||||
} |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
}, |
|
||||
handleReturn(isreload) { |
|
||||
if (isreload === 'true') this.$emit('reloadlist') |
|
||||
this.formobj = { |
|
||||
sid: '', |
|
||||
rackName: '', |
|
||||
rackCode: '', |
|
||||
warehouseName: '', |
|
||||
warehouseSid: '', |
|
||||
zoneName: '', |
|
||||
zoneSid: '', |
|
||||
locationName: '', |
|
||||
locationSid: '', |
|
||||
remarks: '', |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
this.$emit('doback') |
|
||||
}, |
|
||||
showAdd() { |
|
||||
this.initData() |
|
||||
}, |
|
||||
showEdit(row) { |
|
||||
this.initData() |
|
||||
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 |
|
||||
|
|
||||
this.formobj.zoneSid = '' |
|
||||
this.formobj.zoneName = '' |
|
||||
this.formobj.locationSid = '' |
|
||||
this.formobj.locationName = '' |
|
||||
this.getAllWarehousezone(choose[0].sid) |
|
||||
}, |
|
||||
|
|
||||
getAllWarehousezone(sid) { |
|
||||
req4.getAllWarehousezoneBysid({ |
|
||||
ckSid: sid |
|
||||
}).then(resp => { |
|
||||
this.warehouseZoneList = resp.data |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
selectWarehouseZoneChange(val) { |
|
||||
const choose = this.warehouseZoneList.filter((item) => item.sid == val) |
|
||||
console.log('>>>>>>>>>selectWarehouseZoneChange', choose) |
|
||||
this.formobj.zoneSid = choose[0].sid |
|
||||
this.formobj.zoneName = choose[0].zoneName |
|
||||
|
|
||||
this.formobj.locationSid = '' |
|
||||
this.formobj.locationName = '' |
|
||||
this.getWarehouseArea(choose[0].sid) |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
getWarehouseArea(sid) { |
|
||||
|
|
||||
var params = { |
|
||||
qySid: sid |
|
||||
} |
|
||||
|
|
||||
req3.getAllWarehouseareaByZoneSid(params).then(resp => { |
|
||||
console.log('>>>>>>>>>getAllWarehousearea', resp) |
|
||||
this.warehouseAreaList = resp.data |
|
||||
}).catch(() => {}) |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
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; |
|
||||
|
|
||||
.must { |
|
||||
color: #f00; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.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,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="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="rackName" label="库位名称" align="center" /> |
|
||||
<el-table-column prop="rackCode" label="库位编码" align="center" /> |
|
||||
<el-table-column prop="warehouseName" label="所属仓库" align="center" /> |
|
||||
<el-table-column prop="zoneName" 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: '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 '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('orgSidPath') |
|
||||
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() |
|
||||
}, |
|
||||
|
|
||||
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 = 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,317 +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="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: '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 '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('orgSidPath') |
|
||||
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() |
|
||||
}, |
|
||||
|
|
||||
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 = 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,359 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<div v-show="viewState == 1 "> |
|
||||
|
|
||||
|
|
||||
<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 class="must">*</span> 仓库名称:</span> |
|
||||
<el-input v-model="formobj.warehouseName" placeholder="仓库名称" class="item_input" clearable /> |
|
||||
</div> |
|
||||
<div class="item"> |
|
||||
<span class="item_text"><span class="must">*</span> 仓库编码:</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> |
|
||||
<div class="item_input" style="display: flex;flex-direction: row;align-items: center;"> |
|
||||
<el-input v-model="formobj.lngAndLat" placeholder="例:116.397428,39.90923" clearable |
|
||||
style="margin-right: 20px;" /> |
|
||||
<span style="height: 40px;width:7%;color: #0294D7;text-decoration: underline ;cursor: pointer;" |
|
||||
@click="showMap">地图定位</span> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
<div class="item"> |
|
||||
<span class="item_text"><span class="must">*</span> 具体地址:</span> |
|
||||
<el-input v-model="formobj.address" placeholder="具体地址" class="item_input" clearable /> |
|
||||
</div> |
|
||||
<div class="item"> |
|
||||
<span class="item_text"><span class="must">*</span> 使用状态:</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 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> |
|
||||
<!-- End 查询和其列表部分 --> |
|
||||
<!-- 新增修改部分组件 --> |
|
||||
<divAdd v-show="viewState == 2 " ref="divadd" @backData="backData" @doback="resetState" /> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import req from '@/api/baseinfo/warehouse/warehouse.js' |
|
||||
import divAdd from './warehouseAdd2.vue' |
|
||||
export default { |
|
||||
components: { |
|
||||
divAdd |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
viewState: 1, |
|
||||
submitdisabled: false, |
|
||||
dialogVisible: false, |
|
||||
formobj: { |
|
||||
sid: '', |
|
||||
warehouseName: '', |
|
||||
warehouseCode: '', |
|
||||
contacts: "", |
|
||||
mob: "", |
|
||||
telephone: "", |
|
||||
manager: '', |
|
||||
longitude: '', |
|
||||
latitude: '', |
|
||||
lngAndLat: '', |
|
||||
belongingPlace: '', |
|
||||
usageStatus: 1, |
|
||||
address: '', |
|
||||
squareMeter: '', |
|
||||
sortNo: '', |
|
||||
remarks: '', |
|
||||
warehouseType: "0", |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
}, |
|
||||
} |
|
||||
}, |
|
||||
created() {}, |
|
||||
mounted() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
changeTheme(val) { |
|
||||
|
|
||||
}, |
|
||||
saveOrUpdate() { |
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
|
||||
|
|
||||
if (this.formobj.warehouseName == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '仓库名称不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
if (this.formobj.warehouseCode == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '仓库编码不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
if (this.formobj.address == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '具体地址不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
|
|
||||
if (this.formobj.sortNo == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '排序不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
this.submitdisabled = true |
|
||||
req.saveWarehouse(this.formobj) |
|
||||
.then(resp => { |
|
||||
if (resp.success) { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'success', |
|
||||
message: resp.msg |
|
||||
}) |
|
||||
this.handleReturn('true') |
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
this.submitdisabled = false |
|
||||
} |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
}, |
|
||||
handleReturn(isreload) { |
|
||||
if (isreload === 'true') this.$emit('reloadlist') |
|
||||
this.formobj = { |
|
||||
sid: '', |
|
||||
warehouseName: '', |
|
||||
warehouseCode: '', |
|
||||
contacts: "", |
|
||||
mob: "", |
|
||||
telephone: "", |
|
||||
manager: '', |
|
||||
longitude: '', |
|
||||
latitude: '', |
|
||||
lngAndLat: '', |
|
||||
belongingPlace: '', |
|
||||
usageStatus: 1, |
|
||||
address: '', |
|
||||
squareMeter: '', |
|
||||
sortNo: '', |
|
||||
remarks: '', |
|
||||
warehouseType: "0", |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
this.$emit('doback') |
|
||||
}, |
|
||||
showAdd() {}, |
|
||||
showEdit(row) { |
|
||||
req.initWarehouse(row.sid) |
|
||||
.then(resp => { |
|
||||
if (resp.success) { |
|
||||
this.formobj = resp.data |
|
||||
} |
|
||||
}) |
|
||||
.catch(e => { |
|
||||
this.formobj = row |
|
||||
}) |
|
||||
}, |
|
||||
showMap() { |
|
||||
this.viewState = 2 |
|
||||
this.$refs['divadd'].showAdd() |
|
||||
}, |
|
||||
resetState() { |
|
||||
this.viewState = 1 |
|
||||
}, |
|
||||
backData(value) { |
|
||||
this.viewState = 1 |
|
||||
console.log('backData:', value) |
|
||||
this.formobj.address = value.address |
|
||||
this.formobj.lngAndLat = value.lngAndLat |
|
||||
this.formobj.belongingPlace = value.belongingPlace |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
<style lang="scss" scoped> |
|
||||
.g-poi-search { |
|
||||
position: absolute; |
|
||||
top: 80px; |
|
||||
left: 30px; |
|
||||
padding: 8px; |
|
||||
border-radius: 2px; |
|
||||
background-color: #fff; |
|
||||
z-index: 100; |
|
||||
} |
|
||||
|
|
||||
.g-poi-search .el-select .el-input>input.el-input__inner { |
|
||||
height: 28px; |
|
||||
line-height: 28px; |
|
||||
} |
|
||||
|
|
||||
.g-poi-search-popper .el-select-dropdown__item { |
|
||||
width: 200px; |
|
||||
height: 28px; |
|
||||
line-height: 28px; |
|
||||
|
|
||||
} |
|
||||
|
|
||||
// 隐藏上传组件 |
|
||||
|
|
||||
::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; |
|
||||
|
|
||||
.must { |
|
||||
color: #f00; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.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,344 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
|
|
||||
<div class="tab-header webtop"> |
|
||||
<!-- 标题 --> |
|
||||
<div>仓库信息</div> |
|
||||
<!-- start 添加修改按钮 --> |
|
||||
<div> |
|
||||
<el-button type="primary" size="small" @click="saveAddress">保存</el-button> |
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
||||
</div> |
|
||||
<!-- end 添加修改按钮 --> |
|
||||
<!-- end 详情按钮 --> |
|
||||
</div> |
|
||||
|
|
||||
<div class="listconadd"> |
|
||||
<div class="flex-center" style="padding: 5px;"> |
|
||||
<div id="mymap" style="height:650px;width:90%;margin-left: 5%;margin-top: 2%;"></div> |
|
||||
<div class="g-poi-search" style="display: flex;flex-direction: column;"> |
|
||||
<span style="">请输入关键字:</span> |
|
||||
<el-input id="tipinput" v-model="searchText" style="width:300px;margin-top: 5px;" /> |
|
||||
<span style="margin-top: 15px;width:300px;">当前地址:{{addressInfo.address}}</span> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import AMapLoader from "@amap/amap-jsapi-loader"; |
|
||||
|
|
||||
export default { |
|
||||
name: "Home", |
|
||||
components: {}, |
|
||||
data() { |
|
||||
return { |
|
||||
searchText: '', |
|
||||
map: null, |
|
||||
geocoder: null, |
|
||||
addressInfo: { |
|
||||
lngAndLat: "", |
|
||||
address: "", |
|
||||
belongingPlace: "" |
|
||||
}, |
|
||||
pointList: [], |
|
||||
geolocation: null, |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
showAdd() { |
|
||||
this.initMap(); |
|
||||
}, |
|
||||
initMap() { |
|
||||
let that = this; |
|
||||
window._AMapSecurityConfig = { |
|
||||
securityJsCode: "e4ce71df213230e89231cc3ef9c98313", |
|
||||
}; |
|
||||
AMapLoader.load({ |
|
||||
key: "0054c9409ec7a97ddfe933224b36f45c", // 申请好的Web端开发者Key,首次调用 load 时必填 |
|
||||
version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 |
|
||||
plugins: [], //需要使用的的插件列表,如比例尺'AMap.Scale',支持添加多个如:['...','...'] |
|
||||
}) |
|
||||
.then((AMap) => { |
|
||||
|
|
||||
that.map = new AMap.Map("mymap", { |
|
||||
// 设置地图容器id |
|
||||
viewMode: "3D", // 是否为3D地图模式 |
|
||||
zoom: 15, // 初始化地图级别 |
|
||||
center: [116.397428, 39.90923], // 初始化地图中心点位置 |
|
||||
}); |
|
||||
|
|
||||
that.map.plugin("AMap.Geocoder", function() { |
|
||||
that.geocoder = new AMap.Geocoder(); |
|
||||
|
|
||||
|
|
||||
// geocoder.getLocation(address, function (status, result) { |
|
||||
// if (status === "complete" && result.info === "OK") { |
|
||||
// // result中对应详细地理坐标信息 |
|
||||
// console.log(result); |
|
||||
// } |
|
||||
// }); |
|
||||
}); |
|
||||
|
|
||||
that.map.plugin('AMap.Geolocation', function() { |
|
||||
var geolocation = new AMap.Geolocation({ |
|
||||
enableHighAccuracy: true, //是否使用高精度定位,默认:true |
|
||||
timeout: 10000, //超过10秒后停止定位,默认:5s |
|
||||
position: 'RB', //定位按钮的停靠位置 |
|
||||
offset: [10, 20], //定位按钮与设置的停靠位置的偏移量,默认:[10, 20] |
|
||||
zoomToAccuracy: true, //定位成功后是否自动调整地图视野到定位点 |
|
||||
|
|
||||
}); |
|
||||
that.geolocation = geolocation |
|
||||
that.map.addControl(geolocation); |
|
||||
geolocation.getCurrentPosition(function(status, result) { |
|
||||
if (status == 'complete') { |
|
||||
that.onComplete(result) |
|
||||
} else { |
|
||||
that.onError(result) |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
}); |
|
||||
|
|
||||
//输入提示 |
|
||||
var autoOptions = { |
|
||||
input: "tipinput" |
|
||||
}; |
|
||||
|
|
||||
that.map.plugin(['AMap.PlaceSearch', 'AMap.AutoComplete'], function() { |
|
||||
var auto = new AMap.AutoComplete(autoOptions); |
|
||||
var placeSearch = new AMap.PlaceSearch({ |
|
||||
map: that.map |
|
||||
}); //构造地点查询类 |
|
||||
auto.on("select", select); //注册监听,当选中某条记录时会触发 |
|
||||
function select(e) { |
|
||||
placeSearch.setCity(e.poi.adcode); |
|
||||
placeSearch.search(e.poi.name); |
|
||||
placeSearch.search(e.poi.name, function(status, result) { |
|
||||
console.log("placeSearch", result) |
|
||||
that.map.clearMap() |
|
||||
var pois = result.poiList.pois; |
|
||||
for (var i = 0; i < pois.length; i++) { |
|
||||
var poi = pois[i]; |
|
||||
var marker = []; |
|
||||
marker[i] = new AMap.Marker({ |
|
||||
position: poi.location, // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9] |
|
||||
title: poi.name |
|
||||
}); |
|
||||
// 将创建的点标记添加到已有的地图实例: |
|
||||
//创建点标记的点击事件 |
|
||||
marker[i].on("click", function(e) { |
|
||||
console.log("click", e); |
|
||||
that.showInfoWindow2(e) |
|
||||
}); |
|
||||
that.map.add(marker[i]); |
|
||||
} |
|
||||
that.map.setFitView(); |
|
||||
}); //关键字查询查询 |
|
||||
|
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
this.handleClick() |
|
||||
|
|
||||
}) |
|
||||
.catch((e) => { |
|
||||
console.log(e); |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
//解析定位结果 |
|
||||
onComplete(data) { |
|
||||
console.log('定位结果:' + data.position) //经纬度信息 |
|
||||
let lnglat = data.position; |
|
||||
let marker = new AMap.Marker({ //创建标记 |
|
||||
title: "", |
|
||||
position: new AMap.LngLat(lnglat.lng, lnglat.lat) |
|
||||
}) |
|
||||
this.map.clearMap() // 清除所有覆盖物(点标志) |
|
||||
this.map.add(marker) // 添加点标志 |
|
||||
this.showInfoWindow(marker); //自定义信息窗体 |
|
||||
}, |
|
||||
//解析定位错误信息 |
|
||||
onError(data) { |
|
||||
console.log('onError:' + data) //经纬度信息 |
|
||||
this.getLngLatLocation() |
|
||||
}, |
|
||||
//在获取具体定位失败时调用的代码:(非精准定位!!!) |
|
||||
getLngLatLocation() { |
|
||||
const that = this; |
|
||||
that.geolocation.getCityInfo(function(status, result) { |
|
||||
if (status === 'complete') { |
|
||||
let data = result.position |
|
||||
that.address = result.province + result.city; |
|
||||
that.showLocation(data) |
|
||||
} else { |
|
||||
that.$message.error('获取地址失败') |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
//新增标记 |
|
||||
showLocation(data) { |
|
||||
let marker = new AMap.Marker({ |
|
||||
title: "", |
|
||||
position: new AMap.LngLat(data[0], data[1]) //参数为经纬度 |
|
||||
}) |
|
||||
this.map.clearMap() // 清除所有覆盖物(点标志) |
|
||||
this.map.add(marker) // 添加点标志 |
|
||||
this.showInfoWindow(marker); //自定义信息窗体 |
|
||||
}, |
|
||||
//自定义信息窗体 |
|
||||
showInfoWindow2(marker) { |
|
||||
console.log('showInfoWindow:', marker) |
|
||||
let that = this |
|
||||
let lnglat = [marker.lnglat.lng, marker.lnglat.lat] |
|
||||
let address = '' |
|
||||
that.geocoder.getAddress(lnglat, function(status, result) { |
|
||||
if (status === 'complete' && result.regeocode) { |
|
||||
address = result.regeocode.formattedAddress; |
|
||||
that.addressInfo.address = result.regeocode.formattedAddress; |
|
||||
that.addressInfo.lngAndLat = marker.lnglat.lng + ',' + marker.lnglat.lat |
|
||||
let infoWindow = new AMap.InfoWindow({ |
|
||||
isCustom: true, //是否自定义信息窗体 |
|
||||
content: `<div style="background-color: white;padding: 5px; border-radius: 5px;border: 1px solid #cccccc;"> 地址:${address}</div>`, |
|
||||
// content: marker.content, |
|
||||
closeWhenClickMap: true, |
|
||||
zIndex: 999, |
|
||||
offset: new AMap.Pixel(15, -20) |
|
||||
}); |
|
||||
infoWindow.open(that.map, lnglat); |
|
||||
|
|
||||
} else { |
|
||||
// console.log('getAddress:', '根据经纬度查询地址失败') |
|
||||
// that.$message.error('根据经纬度查询地址失败') |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
//自定义信息窗体 |
|
||||
showInfoWindow(marker) { |
|
||||
console.log('showInfoWindow:', marker) |
|
||||
let that = this |
|
||||
let lnglat = [marker._position.lng, marker._position.lat] |
|
||||
let address = '' |
|
||||
that.geocoder.getAddress(lnglat, function(status, result) { |
|
||||
if (status === 'complete' && result.regeocode) { |
|
||||
address = result.regeocode.formattedAddress; |
|
||||
that.addressInfo.address = result.regeocode.formattedAddress; |
|
||||
that.addressInfo.lngAndLat = marker._position.lng + ',' + marker._position.lat |
|
||||
let infoWindow = new AMap.InfoWindow({ |
|
||||
isCustom: true, //是否自定义信息窗体 |
|
||||
content: `<div style="background-color: white;padding: 5px; border-radius: 5px;border: 1px solid #cccccc;"> 地址:${address}</div>`, |
|
||||
// content: marker.content, |
|
||||
closeWhenClickMap: true, |
|
||||
zIndex: 999, |
|
||||
offset: new AMap.Pixel(16, -35) |
|
||||
}); |
|
||||
infoWindow.open(that.map, marker.getPosition()); |
|
||||
|
|
||||
} else { |
|
||||
// console.log('getAddress:', '根据经纬度查询地址失败') |
|
||||
// that.$message.error('根据经纬度查询地址失败') |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
//点击地图获取地理位置 |
|
||||
handleClick() { |
|
||||
this.map.on('click', (e) => { |
|
||||
let lng = e.lnglat.lng |
|
||||
let lat = e.lnglat.lat |
|
||||
console.log('handleClick:', e) |
|
||||
let marker = new AMap.Marker({ |
|
||||
position: new AMap.LngLat(lng, lat), |
|
||||
}) |
|
||||
this.map.clearMap() // 清除所有覆盖物(点标志) |
|
||||
this.map.add(marker) // 添加点标志 |
|
||||
let lnglat = [lng, lat] |
|
||||
let that = this |
|
||||
that.geocoder.getAddress(lnglat, function(status, result) { |
|
||||
if (status === 'complete' && result.regeocode) { |
|
||||
console.log('getAddress:', result.regeocode) |
|
||||
that.addressInfo.address = result.regeocode.formattedAddress; |
|
||||
that.addressInfo.lngAndLat = lng + ',' + lat |
|
||||
that.addressInfo.belongingPlace = result.regeocode.addressComponent.province |
|
||||
that.showInfoWindow(marker); //自定义信息窗体 |
|
||||
// let thisPosition = { |
|
||||
// address: that.address, |
|
||||
// lng: lng, |
|
||||
// lat: lat |
|
||||
// }; |
|
||||
// that.$emit("select", thisPosition) //返回给父组件 |
|
||||
|
|
||||
} else { |
|
||||
console.log('getAddress:', '根据经纬度查询地址失败') |
|
||||
that.$message.error('根据经纬度查询地址失败') |
|
||||
} |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 添加修改返回 |
|
||||
saveAddress() { |
|
||||
this.$emit('backData', this.addressInfo) |
|
||||
this.searchText = '' |
|
||||
this.map = null |
|
||||
this.geocoder = null |
|
||||
this.addressInfo = { |
|
||||
lngAndLat: "", |
|
||||
address: "" |
|
||||
} |
|
||||
this.pointList = [] |
|
||||
this.geolocation = null |
|
||||
}, |
|
||||
// 返回 |
|
||||
handleReturn() { |
|
||||
this.searchText = '' |
|
||||
this.map = null |
|
||||
this.geocoder = null |
|
||||
this.addressInfo = { |
|
||||
lngAndLat: "", |
|
||||
address: "" |
|
||||
} |
|
||||
this.pointList = [] |
|
||||
this.geolocation = null |
|
||||
this.$emit('doback') |
|
||||
} |
|
||||
|
|
||||
|
|
||||
} |
|
||||
}; |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
.g-poi-search { |
|
||||
position: absolute; |
|
||||
top: 100px; |
|
||||
left: 130px; |
|
||||
padding: 8px; |
|
||||
border-radius: 2px; |
|
||||
background-color: #fff; |
|
||||
border: 1px #c1c1c1 solid; |
|
||||
} |
|
||||
|
|
||||
.g-poi-search .el-select .el-input>input.el-input__inner { |
|
||||
height: 28px; |
|
||||
line-height: 28px; |
|
||||
} |
|
||||
|
|
||||
.g-poi-search-popper .el-select-dropdown__item { |
|
||||
width: 200px; |
|
||||
height: 28px; |
|
||||
line-height: 28px; |
|
||||
|
|
||||
} |
|
||||
</style> |
|
@ -1,294 +0,0 @@ |
|||||
<template> |
|
||||
|
|
||||
<div class="flex-center" style="padding: 5px;"> |
|
||||
<div id="mymap" style="height:650px;width:90%;margin-left: 5%;margin-top: 2%;"></div> |
|
||||
<div class="g-poi-search"> |
|
||||
<!-- <span style="">请输入关键字:</span> --> |
|
||||
<el-input id="tipinput" v-model="searchText" style="width:300px;margin-top: 5px;" /> |
|
||||
<!-- <span style="margin-top: 15px;width:300px;">当前地址:{{addressInfo.address}}</span> --> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import AMapLoader from "@amap/amap-jsapi-loader"; |
|
||||
|
|
||||
export default { |
|
||||
name: "Home", |
|
||||
components: {}, |
|
||||
data() { |
|
||||
return { |
|
||||
searchText: '', |
|
||||
map: null, |
|
||||
geocoder: null, |
|
||||
addressInfo: { |
|
||||
lngAndLat: "", |
|
||||
address: "", |
|
||||
belongingPlace: "" |
|
||||
}, |
|
||||
pointList: [], |
|
||||
geolocation: null, |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
showAdd() { |
|
||||
this.initMap(); |
|
||||
}, |
|
||||
initMap() { |
|
||||
let that = this; |
|
||||
window._AMapSecurityConfig = { |
|
||||
securityJsCode: "e4ce71df213230e89231cc3ef9c98313", |
|
||||
}; |
|
||||
AMapLoader.load({ |
|
||||
key: "0054c9409ec7a97ddfe933224b36f45c", // 申请好的Web端开发者Key,首次调用 load 时必填 |
|
||||
version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 |
|
||||
plugins: [], //需要使用的的插件列表,如比例尺'AMap.Scale',支持添加多个如:['...','...'] |
|
||||
}) |
|
||||
.then((AMap) => { |
|
||||
|
|
||||
that.map = new AMap.Map("mymap", { |
|
||||
// 设置地图容器id |
|
||||
viewMode: "3D", // 是否为3D地图模式 |
|
||||
zoom: 15, // 初始化地图级别 |
|
||||
center: [116.397428, 39.90923], // 初始化地图中心点位置 |
|
||||
}); |
|
||||
|
|
||||
//输入提示 |
|
||||
var autoOptions = { |
|
||||
input: "tipinput" |
|
||||
}; |
|
||||
|
|
||||
that.map.plugin(['AMap.PlaceSearch', 'AMap.AutoComplete'], function() { |
|
||||
var auto = new AMap.AutoComplete(autoOptions); |
|
||||
var placeSearch = new AMap.PlaceSearch({ |
|
||||
map: that.map |
|
||||
}); //构造地点查询类 |
|
||||
auto.on("select", select); //注册监听,当选中某条记录时会触发 |
|
||||
function select(e) { |
|
||||
console.log("placeSearch", e) |
|
||||
placeSearch.setCity(e.poi.adcode); |
|
||||
placeSearch.search(e.poi.name); |
|
||||
// placeSearch.search(e.poi.name, function(status, result) { |
|
||||
// console.log("placeSearch", result) |
|
||||
// that.map.clearMap() |
|
||||
// var pois = result.poiList.pois; |
|
||||
// for (var i = 0; i < pois.length; i++) { |
|
||||
// var poi = pois[i]; |
|
||||
// var marker = []; |
|
||||
// marker[i] = new AMap.Marker({ |
|
||||
// position: poi.location, // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9] |
|
||||
// title: poi.name |
|
||||
// }); |
|
||||
// // 将创建的点标记添加到已有的地图实例: |
|
||||
// //创建点标记的点击事件 |
|
||||
// marker[i].on("click", function(e) { |
|
||||
// console.log("click", e); |
|
||||
// that.showInfoWindow2(e) |
|
||||
// }); |
|
||||
// that.map.add(marker[i]); |
|
||||
// } |
|
||||
// that.map.setFitView(); |
|
||||
// }); //关键字查询查询 |
|
||||
|
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
// this.handleClick() |
|
||||
|
|
||||
}) |
|
||||
.catch((e) => { |
|
||||
console.log(e); |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
//解析定位结果 |
|
||||
onComplete(data) { |
|
||||
console.log('定位结果:' + data.position) //经纬度信息 |
|
||||
let lnglat = data.position; |
|
||||
let marker = new AMap.Marker({ //创建标记 |
|
||||
title: "", |
|
||||
position: new AMap.LngLat(lnglat.lng, lnglat.lat) |
|
||||
}) |
|
||||
this.map.clearMap() // 清除所有覆盖物(点标志) |
|
||||
this.map.add(marker) // 添加点标志 |
|
||||
this.showInfoWindow(marker); //自定义信息窗体 |
|
||||
}, |
|
||||
//解析定位错误信息 |
|
||||
onError(data) { |
|
||||
console.log('onError:' + data) //经纬度信息 |
|
||||
this.getLngLatLocation() |
|
||||
}, |
|
||||
//在获取具体定位失败时调用的代码:(非精准定位!!!) |
|
||||
getLngLatLocation() { |
|
||||
const that = this; |
|
||||
that.geolocation.getCityInfo(function(status, result) { |
|
||||
if (status === 'complete') { |
|
||||
let data = result.position |
|
||||
that.address = result.province + result.city; |
|
||||
that.showLocation(data) |
|
||||
} else { |
|
||||
that.$message.error('获取地址失败') |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
//新增标记 |
|
||||
showLocation(data) { |
|
||||
let marker = new AMap.Marker({ |
|
||||
title: "", |
|
||||
position: new AMap.LngLat(data[0], data[1]) //参数为经纬度 |
|
||||
}) |
|
||||
this.map.clearMap() // 清除所有覆盖物(点标志) |
|
||||
this.map.add(marker) // 添加点标志 |
|
||||
this.showInfoWindow(marker); //自定义信息窗体 |
|
||||
}, |
|
||||
//自定义信息窗体 |
|
||||
showInfoWindow2(marker) { |
|
||||
console.log('showInfoWindow:', marker) |
|
||||
let that = this |
|
||||
let lnglat = [marker.lnglat.lng, marker.lnglat.lat] |
|
||||
let address = '' |
|
||||
that.geocoder.getAddress(lnglat, function(status, result) { |
|
||||
if (status === 'complete' && result.regeocode) { |
|
||||
address = result.regeocode.formattedAddress; |
|
||||
that.addressInfo.address = result.regeocode.formattedAddress; |
|
||||
that.addressInfo.lngAndLat = marker.lnglat.lng + ',' + marker.lnglat.lat |
|
||||
let infoWindow = new AMap.InfoWindow({ |
|
||||
isCustom: true, //是否自定义信息窗体 |
|
||||
content: `<div style="background-color: white;padding: 5px; border-radius: 5px;border: 1px solid #cccccc;"> 地址:${address}</div>`, |
|
||||
// content: marker.content, |
|
||||
closeWhenClickMap: true, |
|
||||
zIndex: 999, |
|
||||
offset: new AMap.Pixel(15, -20) |
|
||||
}); |
|
||||
infoWindow.open(that.map, lnglat); |
|
||||
|
|
||||
} else { |
|
||||
// console.log('getAddress:', '根据经纬度查询地址失败') |
|
||||
// that.$message.error('根据经纬度查询地址失败') |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
//自定义信息窗体 |
|
||||
showInfoWindow(marker) { |
|
||||
console.log('showInfoWindow:', marker) |
|
||||
let that = this |
|
||||
let lnglat = [marker._position.lng, marker._position.lat] |
|
||||
let address = '' |
|
||||
that.geocoder.getAddress(lnglat, function(status, result) { |
|
||||
if (status === 'complete' && result.regeocode) { |
|
||||
address = result.regeocode.formattedAddress; |
|
||||
that.addressInfo.address = result.regeocode.formattedAddress; |
|
||||
that.addressInfo.lngAndLat = marker._position.lng + ',' + marker._position.lat |
|
||||
let infoWindow = new AMap.InfoWindow({ |
|
||||
isCustom: true, //是否自定义信息窗体 |
|
||||
content: `<div style="background-color: white;padding: 5px; border-radius: 5px;border: 1px solid #cccccc;"> 地址:${address}</div>`, |
|
||||
// content: marker.content, |
|
||||
closeWhenClickMap: true, |
|
||||
zIndex: 999, |
|
||||
offset: new AMap.Pixel(16, -35) |
|
||||
}); |
|
||||
infoWindow.open(that.map, marker.getPosition()); |
|
||||
|
|
||||
} else { |
|
||||
// console.log('getAddress:', '根据经纬度查询地址失败') |
|
||||
// that.$message.error('根据经纬度查询地址失败') |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
//点击地图获取地理位置 |
|
||||
handleClick() { |
|
||||
this.map.on('click', (e) => { |
|
||||
let lng = e.lnglat.lng |
|
||||
let lat = e.lnglat.lat |
|
||||
console.log('handleClick:', e) |
|
||||
let marker = new AMap.Marker({ |
|
||||
position: new AMap.LngLat(lng, lat), |
|
||||
}) |
|
||||
this.map.clearMap() // 清除所有覆盖物(点标志) |
|
||||
this.map.add(marker) // 添加点标志 |
|
||||
let lnglat = [lng, lat] |
|
||||
let that = this |
|
||||
that.geocoder.getAddress(lnglat, function(status, result) { |
|
||||
if (status === 'complete' && result.regeocode) { |
|
||||
console.log('getAddress:', result.regeocode) |
|
||||
that.addressInfo.address = result.regeocode.formattedAddress; |
|
||||
that.addressInfo.lngAndLat = lng + ',' + lat |
|
||||
that.addressInfo.belongingPlace = result.regeocode.addressComponent.province |
|
||||
that.showInfoWindow(marker); //自定义信息窗体 |
|
||||
// let thisPosition = { |
|
||||
// address: that.address, |
|
||||
// lng: lng, |
|
||||
// lat: lat |
|
||||
// }; |
|
||||
// that.$emit("select", thisPosition) //返回给父组件 |
|
||||
|
|
||||
} else { |
|
||||
console.log('getAddress:', '根据经纬度查询地址失败') |
|
||||
that.$message.error('根据经纬度查询地址失败') |
|
||||
} |
|
||||
}) |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 添加修改返回 |
|
||||
saveAddress() { |
|
||||
this.$emit('backData', this.addressInfo) |
|
||||
// this.searchText = '' |
|
||||
// this.map = null |
|
||||
// this.geocoder = null |
|
||||
// this.addressInfo = { |
|
||||
// lngAndLat: "", |
|
||||
// address: "" |
|
||||
// } |
|
||||
// this.pointList = [] |
|
||||
// this.geolocation = null |
|
||||
}, |
|
||||
// 返回 |
|
||||
handleReturn() { |
|
||||
// this.searchText = '' |
|
||||
// this.map = null |
|
||||
// this.geocoder = null |
|
||||
// this.addressInfo = { |
|
||||
// lngAndLat: "", |
|
||||
// address: "" |
|
||||
// } |
|
||||
// this.pointList = [] |
|
||||
// this.geolocation = null |
|
||||
this.$emit('doback') |
|
||||
} |
|
||||
|
|
||||
|
|
||||
} |
|
||||
}; |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
.g-poi-search { |
|
||||
position: absolute; |
|
||||
top: 100px; |
|
||||
left: 130px; |
|
||||
padding: 8px; |
|
||||
border-radius: 2px; |
|
||||
background-color: #fff; |
|
||||
border: 1px #c1c1c1 solid; |
|
||||
} |
|
||||
|
|
||||
.g-poi-search .el-select .el-input>input.el-input__inner { |
|
||||
height: 28px; |
|
||||
line-height: 28px; |
|
||||
} |
|
||||
|
|
||||
.g-poi-search-popper .el-select-dropdown__item { |
|
||||
width: 200px; |
|
||||
height: 28px; |
|
||||
line-height: 28px; |
|
||||
|
|
||||
} |
|
||||
</style> |
|
@ -1,315 +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="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="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-column prop="zoneName" 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: '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 '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('orgSidPath') |
|
||||
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() |
|
||||
}, |
|
||||
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 = 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,336 +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 class="must">*</span> 所属仓库:</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 class="must">*</span> 所属区域:</span> |
|
||||
<el-select v-model="formobj.zoneName" placeholder="请选择所属区域" class="item_input" |
|
||||
@change="selectWarehouseZoneChange"> |
|
||||
<el-option v-for="item in warehouseZoneList" :key="item.sid" :label="item.zoneName" :value="item.sid" /> |
|
||||
</el-select> |
|
||||
</div> |
|
||||
<div class="item"> |
|
||||
<span class="item_text"><span class="must">*</span> 库区名称:</span> |
|
||||
<el-input v-model="formobj.areaName" placeholder="库区名称" class="item_input" clearable /> |
|
||||
</div> |
|
||||
<div class="item"> |
|
||||
<span class="item_text"><span class="must">*</span> 库区编码:</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 class="must">*</span> 库区类型:</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' |
|
||||
import req4 from '@/api/baseinfo/warehouseZone/warehouseZone.js' |
|
||||
export default { |
|
||||
components: {}, |
|
||||
data() { |
|
||||
return { |
|
||||
submitdisabled: false, |
|
||||
formobj: { |
|
||||
sid: '', |
|
||||
areaName: '', |
|
||||
areaCode: '', |
|
||||
volume: '', |
|
||||
unit: '', |
|
||||
remarks: '', |
|
||||
warehouseName: '', |
|
||||
warehouseSid: '', |
|
||||
zoneName: '', |
|
||||
zoneSid: '', |
|
||||
areaTypeSid: "", |
|
||||
areaTypeName: "", |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
}, |
|
||||
warehouseList: [], |
|
||||
warehouseTypeList: [], |
|
||||
warehouseZoneList: [] |
|
||||
} |
|
||||
}, |
|
||||
created() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
initData() { |
|
||||
var parpams = { |
|
||||
orgPath: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
req2.getAllWarehouse(parpams).then(resp => { |
|
||||
this.warehouseList = resp.data |
|
||||
}) |
|
||||
|
|
||||
req3.getAllWarehouseareatype(parpams).then(resp => { |
|
||||
this.warehouseTypeList = resp.data |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
saveOrUpdate() { |
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
|
||||
|
|
||||
if (this.formobj.warehouseName == '' || this.formobj.warehouseSid == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '所属仓库不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
if (this.formobj.zoneName == '' || this.formobj.zoneSid == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '所属区域不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
|
|
||||
if (this.formobj.areaName == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '库区名称不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
if (this.formobj.areaCode == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '库区编码不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
if (this.formobj.areaTypeName == '' || this.formobj.areaTypeSid == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '库区类型不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
this.submitdisabled = true |
|
||||
req.saveWarehousearea(this.formobj) |
|
||||
.then(resp => { |
|
||||
if (resp.success) { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'success', |
|
||||
message: resp.msg |
|
||||
}) |
|
||||
this.handleReturn('true') |
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
this.submitdisabled = false |
|
||||
} |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
}, |
|
||||
handleReturn(isreload) { |
|
||||
if (isreload === 'true') this.$emit('reloadlist') |
|
||||
this.formobj = { |
|
||||
sid: '', |
|
||||
areaName: '', |
|
||||
areaCode: '', |
|
||||
volume: '', |
|
||||
unit: '', |
|
||||
remarks: '', |
|
||||
warehouseName: '', |
|
||||
warehouseSid: '', |
|
||||
zoneName: '', |
|
||||
zoneSid: '', |
|
||||
areaTypeSid: "", |
|
||||
areaTypeName: "", |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
|
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
this.$emit('doback') |
|
||||
}, |
|
||||
showAdd() { |
|
||||
this.initData() |
|
||||
}, |
|
||||
showEdit(row) { |
|
||||
this.initData() |
|
||||
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 |
|
||||
this.formobj.zoneSid = '' |
|
||||
this.formobj.zoneName = '' |
|
||||
this.getAllWarehousezone(choose[0].sid) |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
getAllWarehousezone(sid) { |
|
||||
req4.getAllWarehousezoneBysid({ |
|
||||
ckSid: sid |
|
||||
}).then(resp => { |
|
||||
this.warehouseZoneList = resp.data |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
selectWarehouseZoneChange(val) { |
|
||||
const choose = this.warehouseZoneList.filter((item) => item.sid == val) |
|
||||
console.log('>>>>>>>>>selectWarehouseZoneChange', choose) |
|
||||
this.formobj.zoneSid = choose[0].sid |
|
||||
this.formobj.zoneName = choose[0].zoneName |
|
||||
}, |
|
||||
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; |
|
||||
|
|
||||
.must { |
|
||||
color: #f00; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.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,309 +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="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="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: '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 '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('orgSidPath') |
|
||||
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() |
|
||||
}, |
|
||||
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 = 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,189 +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 class="must">*</span> 库区类型名称:</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: '', |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
}, |
|
||||
} |
|
||||
}, |
|
||||
created() {}, |
|
||||
methods: { |
|
||||
saveOrUpdate() { |
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
|
||||
|
|
||||
if (this.formobj.warehouseAreaTypeName == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '库区类型名称不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
this.submitdisabled = true |
|
||||
req.saveWarehousearea(this.formobj) |
|
||||
.then(resp => { |
|
||||
if (resp.success) { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'success', |
|
||||
message: resp.msg |
|
||||
}) |
|
||||
this.handleReturn('true') |
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
this.submitdisabled = false |
|
||||
} |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
}, |
|
||||
handleReturn(isreload) { |
|
||||
if (isreload === 'true') this.$emit('reloadlist') |
|
||||
this.formobj = { |
|
||||
sid: '', |
|
||||
warehouseAreaTypeName: '', |
|
||||
remarks: '', |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
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; |
|
||||
|
|
||||
.must { |
|
||||
color: #f00; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.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,337 +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.warehouseSid" placeholder="所属仓库"> |
|
||||
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" |
|
||||
:value="item.sid" /> |
|
||||
</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="0" @change="enableChange(scope.row.sid,scope.row.isEnable)" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="zoneName" label="区域名称" align="center" /> |
|
||||
<el-table-column prop="zoneCode" label="区域编码" align="center" /> |
|
||||
<el-table-column prop="volume" label="区域面积" align="center" /> |
|
||||
<el-table-column prop="unit" label="计量单位" align="center" /> |
|
||||
<el-table-column prop="remarks" 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" /> |
|
||||
<!-- <divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" /> --> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import req from '@/api/baseinfo/warehouseZone/warehouseZone.js' |
|
||||
import req2 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 './warehouseZoneAdd.vue' |
|
||||
// import divInfo from './warehouseInfo.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: 'plus', |
|
||||
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: "", |
|
||||
address: "" |
|
||||
} |
|
||||
}, |
|
||||
sids: [], |
|
||||
selectionList: [], |
|
||||
warehouseList: [], |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.$refs['btnbar'].setButtonList(this.btnList) |
|
||||
}, |
|
||||
created() { |
|
||||
this.loadList() |
|
||||
this.getwarehouse() |
|
||||
}, |
|
||||
methods: { |
|
||||
selectionLineChangeHandle(val) { |
|
||||
console.log("val", val); |
|
||||
|
|
||||
this.selectionList = val |
|
||||
|
|
||||
const aa = [] |
|
||||
val.forEach(element => { |
|
||||
aa.push(element.sid) |
|
||||
}) |
|
||||
this.sids = aa |
|
||||
|
|
||||
|
|
||||
}, |
|
||||
getwarehouse() { |
|
||||
var parpams = { |
|
||||
orgPath: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
req2.getAllWarehouse(parpams).then(resp => { |
|
||||
console.log('>>>>>>>>>getAllWarehouse', resp) |
|
||||
this.warehouseList = resp.data |
|
||||
}).catch(() => {}) |
|
||||
}, |
|
||||
// 搜索条件效果 |
|
||||
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('orgSidPath') |
|
||||
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: "", |
|
||||
address: "" |
|
||||
} |
|
||||
} |
|
||||
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 = 4 |
|
||||
this.$refs['divinfo'].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,274 +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-card class="box-card"> |
|
||||
<div class="item"> |
|
||||
<span class="item_text"><span class="must">*</span> 所属仓库:</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 class="must">*</span> 区域名称:</span> |
|
||||
<el-input v-model="formobj.zoneName" placeholder="区域名称" class="item_input" clearable /> |
|
||||
</div> |
|
||||
<div class="item"> |
|
||||
<span class="item_text"><span class="must">*</span> 区域编码:</span> |
|
||||
<el-input v-model="formobj.zoneCode" 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-input v-model="formobj.remarks" placeholder="备注" class="item_input" clearable /> |
|
||||
</div> |
|
||||
|
|
||||
</el-card> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import req from '@/api/baseinfo/warehouseZone/warehouseZone.js' |
|
||||
import req2 from '@/api/baseinfo/warehouse/warehouse.js' |
|
||||
export default { |
|
||||
components: {}, |
|
||||
data() { |
|
||||
return { |
|
||||
title: "【新增】", |
|
||||
submitdisabled: false, |
|
||||
formobj: { |
|
||||
sid: '', |
|
||||
zoneName: '', |
|
||||
zoneCode: '', |
|
||||
volume: '', |
|
||||
unit: '', |
|
||||
remarks: '', |
|
||||
warehouseName: '', |
|
||||
warehouseSid: '', |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
}, |
|
||||
warehouseList: [], |
|
||||
rules: { |
|
||||
warehouseName: [{ |
|
||||
required: true, |
|
||||
message: '请选择所属仓库', |
|
||||
trigger: 'change' |
|
||||
}], |
|
||||
|
|
||||
zoneName: [{ |
|
||||
required: true, |
|
||||
message: '区域名称不能为空', |
|
||||
trigger: 'blur' |
|
||||
}], |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
created() { |
|
||||
this.initData() |
|
||||
}, |
|
||||
methods: { |
|
||||
initData() { |
|
||||
var parpams = { |
|
||||
orgPath: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
req2.getAllWarehouse(parpams).then(resp => { |
|
||||
this.warehouseList = resp.data |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
saveOrUpdate() { |
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
|
||||
|
|
||||
if (this.formobj.warehouseName == '' || this.formobj.warehouseSid == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '所属仓库不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
if (this.formobj.zoneName == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '区域名称不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
if (this.formobj.zoneCode == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '区域编码不能为空' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
req.saveWarehousezone(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: '', |
|
||||
zoneName: '', |
|
||||
zoneCode: '', |
|
||||
volume: '', |
|
||||
unit: '', |
|
||||
remarks: '', |
|
||||
warehouseName: '', |
|
||||
warehouseSid: '', |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
|
|
||||
} |
|
||||
this.$emit('doback') |
|
||||
}, |
|
||||
showAdd() { |
|
||||
this.title = "【新增】" |
|
||||
|
|
||||
}, |
|
||||
showEdit(row) { |
|
||||
this.title = "【编辑】", |
|
||||
|
|
||||
req.initWarehousezone(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 |
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</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; |
|
||||
|
|
||||
.must { |
|
||||
color: #f00; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.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,315 +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: "", |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
}, |
|
||||
hideUploadBtn: true, |
|
||||
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('value', value) |
|
||||
|
|
||||
if (value.length > 0) { |
|
||||
this.formobj.image = value[0].url |
|
||||
} else { |
|
||||
this.formobj.image = '' |
|
||||
} |
|
||||
this.hideUploadBtn = value.length == 1 |
|
||||
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) { |
|
||||
this.submitdisabled = true |
|
||||
req.saveBrands(this.formobj) |
|
||||
.then(resp => { |
|
||||
if (resp.success) { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'success', |
|
||||
message: resp.msg |
|
||||
}) |
|
||||
this.handleReturn('true') |
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
this.submitdisabled = false |
|
||||
} |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
handleReturn(isreload) { |
|
||||
if (isreload === 'true') this.$emit('reloadlist') |
|
||||
this.imgList = [] |
|
||||
this.hideUploadBtn = true |
|
||||
this.formobj = { |
|
||||
sid: '', |
|
||||
brandName: '', |
|
||||
brandCode: '', |
|
||||
remarks: '', |
|
||||
letter: '', |
|
||||
image: "", |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
this.$emit('doback') |
|
||||
}, |
|
||||
showAdd() { |
|
||||
console.log("this.imgList", this.imgList) |
|
||||
this.hideUploadBtn = this.imgList.length == 1 |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
showEdit(row) { |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
|
|
||||
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 == 1 |
|
||||
} |
|
||||
}) |
|
||||
.catch(e => { |
|
||||
this.formobj = row |
|
||||
this.imgList = [] |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
/deep/ .el-form-item__error { |
|
||||
margin-left: 120px !important; |
|
||||
} |
|
||||
|
|
||||
/deep/.hide .el-upload--picture-card { |
|
||||
display: none; |
|
||||
} |
|
||||
|
|
||||
.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('orgSidPath') |
|
||||
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,391 +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="outStockRuleVaule"> |
|
||||
<el-select v-model="formobj.outStockRuleVaule" 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: '', |
|
||||
outStockRuleVaule: '', |
|
||||
sids: '', |
|
||||
pname: '', |
|
||||
sortNo: '', |
|
||||
remarks: '', |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
}, |
|
||||
goodsTypeList: [], |
|
||||
outStockRuleList: [], |
|
||||
rules: { |
|
||||
goodsTypeName: [{ |
|
||||
required: true, |
|
||||
message: '类别名称不能为空', |
|
||||
trigger: 'blur' |
|
||||
}], |
|
||||
goodsTypeCode: [{ |
|
||||
required: true, |
|
||||
message: '类别编码不能为空', |
|
||||
trigger: 'blur' |
|
||||
}], |
|
||||
outStockRuleVaule: [{ |
|
||||
required: true, |
|
||||
message: '请选择出库规则', |
|
||||
trigger: 'change' |
|
||||
}], |
|
||||
sortNo: [{ |
|
||||
required: true, |
|
||||
message: '排序不能为空', |
|
||||
trigger: 'blur' |
|
||||
}], |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
created() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
initData() { |
|
||||
console.log('>>>>>>>>>initData') |
|
||||
var parpams = { |
|
||||
orgPath: window.sessionStorage.getItem('orgsid'), |
|
||||
} |
|
||||
|
|
||||
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) { |
|
||||
this.submitdisabled = true |
|
||||
req.saveTypes(this.formobj) |
|
||||
.then(resp => { |
|
||||
if (resp.success) { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'success', |
|
||||
message: resp.msg |
|
||||
}) |
|
||||
this.handleReturn('true') |
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
this.submitdisabled = false |
|
||||
} |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
handleReturn(isreload) { |
|
||||
if (isreload === 'true') this.$emit('reloadlist') |
|
||||
this.formobj = { |
|
||||
sid: '', |
|
||||
goodsTypeName: '', |
|
||||
goodsTypeCode: '', |
|
||||
percentageRate: '', |
|
||||
percentageAmount: '', |
|
||||
outStockRule: '', |
|
||||
outStockRuleValue: '', |
|
||||
sids: '', |
|
||||
pname: '', |
|
||||
sortNo: '', |
|
||||
remarks: '', |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
this.$emit('doback') |
|
||||
}, |
|
||||
showAdd() { |
|
||||
this.initData() |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
showEdit(row) { |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
|
|
||||
this.initData() |
|
||||
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.outStockRuleVaule = 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,380 +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="outStockRuleVaule" 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('orgSidPath') |
|
||||
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,253 +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: "", |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
}, |
|
||||
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) { |
|
||||
this.submitdisabled = true |
|
||||
req.saveFacturer(this.formobj) |
|
||||
.then(resp => { |
|
||||
if (resp.success) { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'success', |
|
||||
message: resp.msg |
|
||||
}) |
|
||||
this.handleReturn('true') |
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
this.submitdisabled = false |
|
||||
} |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
|
|
||||
}, |
|
||||
handleReturn(isreload) { |
|
||||
if (isreload === 'true') this.$emit('reloadlist') |
|
||||
this.formobj = { |
|
||||
sid: '', |
|
||||
manufacturerName: '', |
|
||||
manufacturerCode: '', |
|
||||
sortNo: '', |
|
||||
remarks: "", |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
this.$emit('doback') |
|
||||
}, |
|
||||
showAdd() { |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
showEdit(row) { |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
|
|
||||
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('orgSidPath') |
|
||||
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
@ -1,523 +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('orgSid'), |
|
||||
} |
|
||||
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) { |
|
||||
this.submitdisabled = true |
|
||||
req.saveGoods(this.formobj) |
|
||||
.then(resp => { |
|
||||
|
|
||||
if (resp.success) { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'success', |
|
||||
message: resp.msg |
|
||||
}) |
|
||||
this.handleReturn('true') |
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
this.submitdisabled = false |
|
||||
} |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
|
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
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.submitdisabled = false |
|
||||
this.$emit('doback') |
|
||||
}, |
|
||||
showAdd() { |
|
||||
// var sid = require('uuid').v1() |
|
||||
// console.log('>>>>>>>>>showAdd', sid) |
|
||||
|
|
||||
// this.formobj.sid = sid this.$nextTick(() => { |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
|
|
||||
|
|
||||
}, |
|
||||
indexMethod(index) { |
|
||||
return index + 1 |
|
||||
}, |
|
||||
showEdit(row) { |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
|
|
||||
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,446 +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 |
|
||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') |
|
||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('orgSidPath') |
|
||||
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() |
|
||||
}, |
|
||||
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('orgSidPath') |
|
||||
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,193 +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: '', |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
}, |
|
||||
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) { |
|
||||
this.submitdisabled = true |
|
||||
req.saveUnits(this.formobj) |
|
||||
.then(resp => { |
|
||||
if (resp.success) { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'success', |
|
||||
message: resp.msg |
|
||||
}) |
|
||||
this.handleReturn('true') |
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
this.submitdisabled = false |
|
||||
} |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
|
|
||||
}, |
|
||||
handleReturn(isreload) { |
|
||||
if (isreload === 'true') this.$emit('reloadlist') |
|
||||
this.formobj = { |
|
||||
sid: '', |
|
||||
unitName: '', |
|
||||
remarks: '', |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath'), |
|
||||
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
this.$emit('doback') |
|
||||
}, |
|
||||
showAdd() { |
|
||||
|
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
showEdit(row) { |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
|
|
||||
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,712 +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-select v-model="queryParams.params.busTypeKey" placeholder="请选择" style="width: 200px;"> |
|
||||
<el-option v-for="(item,i) in busTypeList" :key="item.sid" :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="请选择" style="width: 200px;"> |
|
||||
<el-option v-for="(item,i) in billStateList" :label="item.name" :value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="外部单号"> |
|
||||
<el-input v-model="queryParams.params.sourceBillNo" 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.goodsSkuSid" placeholder="请选择" style="width: 220px;"> |
|
||||
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" :value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="申请时间"> |
|
||||
<el-date-picker v-model="queryParams.params.applicationTimeStart" 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.applicationTimeEnd" 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.carrier" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="运单号"> |
|
||||
<el-input v-model="queryParams.params.waybillNumber" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="库位"> |
|
||||
<el-select v-model="queryParams.params.warehouseRackSid" placeholder="请选择库位" style="width: 200px;"> |
|
||||
<el-option v-for="item in warehouseRackList" :key="item.sid" :label="item.rackCode" |
|
||||
: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> |
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
|
||||
</div> |
|
||||
<!-- End 项目列表头部 --> |
|
||||
<!-- Start 项目列表 --> |
|
||||
<div class=""> |
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
|
||||
@selection-change="selectionLineChangeHandle" @row-click="rowItemClick"> |
|
||||
<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"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button> |
|
||||
</template> |
|
||||
</el-table-column> --> |
|
||||
<el-table-column prop="applicationTime" label="申请时间" align="center" width="220" /> |
|
||||
<el-table-column prop="billNo" label="单据编码" align="center" width="220" /> |
|
||||
<el-table-column prop="busTypeKeyValue" label="单据类型" align="center" width="150" /> |
|
||||
<el-table-column prop="handoverStatusValue" label="交接状态" align="center" width="150" /> |
|
||||
<el-table-column prop="handoverTime" label="交接时间" align="center" width="180" /> |
|
||||
<el-table-column prop="billStateValue" label="状态" align="center" width="150" /> |
|
||||
<el-table-column prop="warehouseName" label="仓库" align="center" width="150" /> |
|
||||
<el-table-column label="入库库位" align="center" width="180"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-select v-model="scope.row.warehouseRackCode" placeholder="请选择" |
|
||||
@focus="getWarehouseAreaList(scope.row.warehouseSid)" |
|
||||
@change="selectWarehouseAreaCode(scope.row,$event)"> |
|
||||
<el-option v-for="(item,i) in warehouseRackList2" :key="i" :label="item.rackCode" :value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="applicant" label="申请人" align="center" width="150" /> |
|
||||
<el-table-column prop="reservationTime" label="预约时间" align="center" width="180" /> |
|
||||
<el-table-column prop="supplierName" label="供应商" align="center" width="150" /> |
|
||||
<el-table-column prop="sourceBillNo" label="外部单号" align="center" width="150" /> |
|
||||
<el-table-column label="单据备注" align="center" min-width="200"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-input ref="" v-model="scope.row.remarks" clearable placeholder="" |
|
||||
@change="itemRemarks(scope.row)" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="contact" label="联系人" align="center" width="150" /> |
|
||||
<el-table-column prop="mobile" label="联系电话" align="center" width="150" /> |
|
||||
<el-table-column prop="carrier" label="承运商" align="center" width="150" /> |
|
||||
<el-table-column prop="waybillNumber" 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 class=""> |
|
||||
<el-tabs v-model="activeName" type="border-card"> |
|
||||
<el-tab-pane name="first" label="商品明细"> |
|
||||
<el-table :data="goodsDetailList" border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> |
|
||||
<el-table-column prop="goodsSkuCode" label="商品条码" align="center" /> |
|
||||
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" /> |
|
||||
<el-table-column prop="goodsSkuOwnSpec" label="规格编码" align="center" /> |
|
||||
<el-table-column prop="goodsSkuOwnSpec" label="规格值" align="center" /> |
|
||||
<el-table-column prop="unit" label="单位" align="center" /> |
|
||||
<el-table-column prop="orderCount" label="预约数量" align="center" /> |
|
||||
<el-table-column prop="actualInCount" label="实际入库数量" align="center" /> |
|
||||
<el-table-column prop="waitInCount" label="待收货数量" align="center" /> |
|
||||
</el-table> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="second" label="发货人信息"> |
|
||||
<el-form ref="dataForm" class="formaddcopy02" :model="formobj"> |
|
||||
<el-row class="first_row"> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">姓名</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.contactName }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">省</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.province }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">市</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.city }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">县</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.county }}</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"></span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<div class="span-sty">详细地址</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.address }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">邮编</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.zipCode }}</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.contactMobile }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">电话</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.contactTelePhone }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">邮箱</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.email }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty"></div> |
|
||||
<el-form-item> </el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="operateList" label="操作记录"> |
|
||||
<el-table :data="operateList" border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="createTime" label="操作时间" width="250" align="center" /> |
|
||||
<el-table-column prop="userName" label="操作账号" width="180" align="center" /> |
|
||||
<el-table-column prop="content" label="操作内容" align="center" /> |
|
||||
</el-table> |
|
||||
</el-tab-pane> |
|
||||
</el-tabs> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
<!-- <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" |
|
||||
text-color="#666" active-text-color="white"> |
|
||||
|
|
||||
<el-menu-item index="1">商品明细</el-menu-item> |
|
||||
<el-menu-item index="2">发货人信息</el-menu-item> |
|
||||
<el-menu-item index="3">操作记录</el-menu-item> |
|
||||
</el-menu> |
|
||||
|
|
||||
<div v-show="activeIndex=='1'" style="margin-bottom: 50px;"> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
<div v-show="activeIndex=='2'" style="margin-bottom: 50px;"> |
|
||||
|
|
||||
<el-form ref="dataForm" class="formaddcopy02" :model="formobj"> |
|
||||
<el-row class="first_row"> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">姓名</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.contactName }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">省</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.province }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">市</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.city }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">县</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.county }}</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"></span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<div class="span-sty">详细地址</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.address }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">邮编</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.zipCode }}</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.contactMobile }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">电话</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.contactTelePhone }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty">邮箱</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ formobj.email }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="6"> |
|
||||
<div class="span-sty"></div> |
|
||||
<el-form-item> </el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
|
|
||||
</div> |
|
||||
<div v-show="activeIndex=='3'" style="margin-bottom: 50px;"> |
|
||||
<el-table :data="operateList" border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="createTime" label="操作时间" width="250" align="center" /> |
|
||||
<el-table-column prop="userName" label="操作账号" width="180" align="center" /> |
|
||||
<el-table-column prop="content" label="操作内容" align="center" /> |
|
||||
</el-table> |
|
||||
</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/deliveryNotice.js' |
|
||||
import req2 from '@/api/baseinfo/goodsShelves/goodsShelves.js' |
|
||||
import req3 from '@/api/goods/goods.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' |
|
||||
import { |
|
||||
typeValues, |
|
||||
} from '@/api/Common/dictcommons' |
|
||||
export default { |
|
||||
components: { |
|
||||
ButtonBar, |
|
||||
Pagination, |
|
||||
pageye, |
|
||||
// divAdd, |
|
||||
// divInfo |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
activeName: "first", |
|
||||
activeIndex: '1', |
|
||||
dialogVisible: false, |
|
||||
formobj: {}, |
|
||||
btndisabled: false, |
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|
||||
isSearchShow: false, |
|
||||
searchxianshitit: '显示查询条件', |
|
||||
tableLoading: false, |
|
||||
dataList: [], |
|
||||
btnList: [{ |
|
||||
type: 'primary', |
|
||||
size: 'small', |
|
||||
icon: 'plus', |
|
||||
btnKey: 'toPrintBill', |
|
||||
btnLabel: '打印入库预约单' |
|
||||
}, { |
|
||||
type: 'primary', |
|
||||
size: 'small', |
|
||||
icon: 'plus', |
|
||||
btnKey: 'toPrintCode', |
|
||||
btnLabel: '打印条码' |
|
||||
}, |
|
||||
{ |
|
||||
type: 'success', |
|
||||
size: 'small', |
|
||||
icon: 'export', |
|
||||
btnKey: 'toBuild', |
|
||||
btnLabel: '导出' |
|
||||
}, |
|
||||
{ |
|
||||
type: 'info', |
|
||||
size: 'small', |
|
||||
icon: 'cross', |
|
||||
btnKey: 'doClose', |
|
||||
btnLabel: '关闭' |
|
||||
} |
|
||||
], |
|
||||
queryParams: { |
|
||||
current: 1, |
|
||||
size: 10, |
|
||||
total: 0, |
|
||||
params: { |
|
||||
"busTypeKey": "", |
|
||||
"sourceBillNo": "", |
|
||||
"billNo": "", |
|
||||
"goodsSkuSid": "", |
|
||||
"applicationTimeStart": "", |
|
||||
"applicationTimeEnd": "", |
|
||||
"billState": "", |
|
||||
"carrier": "", |
|
||||
"waybillNumber": "", |
|
||||
"warehouseRackSid": "", |
|
||||
"menuUrl": "", |
|
||||
"orgPath": "", |
|
||||
"userSid": "" |
|
||||
} |
|
||||
}, |
|
||||
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" |
|
||||
} |
|
||||
], |
|
||||
goodsList: [], |
|
||||
warehouseRackList: [], |
|
||||
goodsDetailList: [], |
|
||||
operateList: [], |
|
||||
warehouseRackList2: [], |
|
||||
rowItemSid: '', |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.$refs['btnbar'].setButtonList(this.btnList) |
|
||||
}, |
|
||||
created() { |
|
||||
this.init() |
|
||||
this.loadList() |
|
||||
}, |
|
||||
methods: { |
|
||||
init() { |
|
||||
|
|
||||
// typeValues({ |
|
||||
// type: 'receiveState' |
|
||||
// }).then((res) => { |
|
||||
// if (res.success) { |
|
||||
// this.billStateList = res.data |
|
||||
// } |
|
||||
// }) |
|
||||
|
|
||||
|
|
||||
var query = { |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath') |
|
||||
} |
|
||||
req2.warehouserackListAll(query).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.warehouseRackList = res.data |
|
||||
|
|
||||
console.log("aaaaaa", this.warehouseRackList); |
|
||||
|
|
||||
} |
|
||||
}) |
|
||||
req3.getGoodsListAllByOrg(query).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.goodsList = res.data |
|
||||
|
|
||||
console.log("aaaaaa", this.goodsList); |
|
||||
|
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
rowItemClick(row) { |
|
||||
console.log("row", row); |
|
||||
this.rowItemSid = row.sid |
|
||||
|
|
||||
if (this.rowItemSid == '') { |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
showClose: true, |
|
||||
message: '暂无数据' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
req.selectByBillSid(this.rowItemSid).then((resp) => { |
|
||||
this.goodsDetailList = resp.data |
|
||||
}).catch(() => {}) |
|
||||
|
|
||||
req.fetchDetailsBySid(this.rowItemSid).then((resp) => { |
|
||||
this.formobj = resp.data |
|
||||
}).catch(() => {}) |
|
||||
|
|
||||
var parpams = { |
|
||||
sid: this.rowItemSid |
|
||||
} |
|
||||
req.operationrecordDetails(parpams).then((resp) => { |
|
||||
this.operateList = resp.data |
|
||||
}).catch(() => {}) |
|
||||
|
|
||||
// this.handleSelect() |
|
||||
}, |
|
||||
|
|
||||
// handleSelect() { |
|
||||
|
|
||||
// }, |
|
||||
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 'toPrintBill': |
|
||||
this.toPrintBill() |
|
||||
break |
|
||||
case 'toPrintCode': |
|
||||
this.toPrintCode() |
|
||||
break |
|
||||
case 'toBuild': |
|
||||
this.toBuild() |
|
||||
break |
|
||||
case 'doClose': |
|
||||
this.doClose() |
|
||||
break |
|
||||
default: |
|
||||
break |
|
||||
} |
|
||||
}, |
|
||||
toPrintBill() { |
|
||||
if (this.selectionList.length != 1) { |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
message: "请选择一条数据。", |
|
||||
showClose: true |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
}, |
|
||||
toPrintCode() { |
|
||||
|
|
||||
if (this.selectionList.length != 1) { |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
message: "请选择一条数据。", |
|
||||
showClose: true |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
}, |
|
||||
toBuild() { |
|
||||
if (this.selectionList.length != 1) { |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
message: "请选择一条数据。", |
|
||||
showClose: true |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
}, |
|
||||
doClose() { |
|
||||
this.$store.dispatch('tagsView/delView', this.$route) |
|
||||
this.$router.go(-1) |
|
||||
}, |
|
||||
|
|
||||
loadList() { |
|
||||
this.tableLoading = true |
|
||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') |
|
||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('orgSidPath') |
|
||||
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 |
|
||||
this.goodsDetailList = [] |
|
||||
this.formobj = {} |
|
||||
this.operateList = [] |
|
||||
this.rowItemClick(data.records[0]) |
|
||||
|
|
||||
} 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: { |
|
||||
"busTypeKey": "", |
|
||||
"sourceBillNo": "", |
|
||||
"billNo": "", |
|
||||
"goodsSkuSid": "", |
|
||||
"applicationTimeStart": "", |
|
||||
"applicationTimeEnd": "", |
|
||||
"billState": "", |
|
||||
"carrier": "", |
|
||||
"waybillNumber": "", |
|
||||
"warehouseRackSid": "", |
|
||||
"menuUrl": "", |
|
||||
"orgPath": "", |
|
||||
"userSid": "" |
|
||||
} |
|
||||
} |
|
||||
this.loadList() |
|
||||
}, |
|
||||
|
|
||||
resetState() { |
|
||||
this.viewState = 1 |
|
||||
}, |
|
||||
|
|
||||
getWarehouseAreaList(sid) { |
|
||||
var query = { |
|
||||
ckSid: sid |
|
||||
} |
|
||||
req2.getWarehouseareas(query).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.warehouseRackList2 = res.data |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
selectWarehouseAreaCode(row, val) { |
|
||||
console.log("selectWarehouseAreaCode", val); |
|
||||
|
|
||||
const choose = this.warehouseRackList2.filter((item) => item.sid == val) |
|
||||
console.log('>>>>>>>>>selectWarehouseAreaCode', choose) |
|
||||
row.warehouseRackCode = choose[0].rackCode |
|
||||
row.warehouseRackSid = choose[0].sid |
|
||||
|
|
||||
var query = { |
|
||||
sid: row.sid, |
|
||||
rackSid: row.warehouseRackSid, |
|
||||
userSid: window.sessionStorage.getItem('userSid') |
|
||||
} |
|
||||
req.updateRack(query).then((res) => {}) |
|
||||
|
|
||||
}, |
|
||||
itemRemarks(row) { |
|
||||
console.log("itemRemarks", row); |
|
||||
|
|
||||
var query = { |
|
||||
sid: row.sid, |
|
||||
remarks: row.remarks, |
|
||||
userSid: window.sessionStorage.getItem('userSid') |
|
||||
} |
|
||||
req.updateRemarks(query).then((res) => {}) |
|
||||
|
|
||||
} |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</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; |
|
||||
} |
|
||||
|
|
||||
.el-menu-item.is-active { |
|
||||
background-color: #3370ff !important; |
|
||||
color: #fff; |
|
||||
|
|
||||
span { |
|
||||
color: #fff; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.el-submenu__title.is-active { |
|
||||
background: #1c88cf !important; |
|
||||
color: #fff !important; |
|
||||
} |
|
||||
</style> |
|
@ -1,716 +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: { |
|
||||
|
|
||||
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() { |
|
||||
|
|
||||
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].manufactureDate == '') { |
|
||||
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() |
|
||||
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,559 +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.storageTimeStart" 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.storageTimeEnd" 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.warehouseRackSid" placeholder="请选择库位" style="width: 200px;"> |
|
||||
<el-option v-for="item in warehouseRackList" :key="item.sid" :label="item.rackCode" |
|
||||
:value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="商品"> |
|
||||
<el-select v-model="queryParams.params.goodsSkuSid" placeholder="请选择" style="width: 200px;"> |
|
||||
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" :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> |
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
|
||||
</div> |
|
||||
<!-- End 项目列表头部 --> |
|
||||
<!-- Start 项目列表 --> |
|
||||
<div class=""> |
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
|
||||
@selection-change="selectionLineChangeHandle" @row-click="rowItemClick"> |
|
||||
<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="billStateValue" label="状态" align="center" /> |
|
||||
<el-table-column prop="billNo" label="入库单号" align="center" /> |
|
||||
<el-table-column prop="total" label="商品总额" align="center" /> |
|
||||
<el-table-column prop="totalWeight" label="商品总重量(kg)" align="center" /> |
|
||||
<el-table-column prop="totalVolume" label="商品总体积(m³)" align="center" /> |
|
||||
<el-table-column prop="totalQuantity" label="商品总数" align="center" /> |
|
||||
<el-table-column prop="supplierName" label="供应商" align="center" /> |
|
||||
<el-table-column prop="carrier" label="承运商" align="center" /> |
|
||||
<el-table-column prop="waybillNumber" label="运单号" align="center" /> |
|
||||
<el-table-column prop="shipper" label="货主" align="center" /> |
|
||||
<el-table-column prop="storageTime" label="入库时间" align="center" /> |
|
||||
<el-table-column prop="operatorName" label="操作员" align="center" /> |
|
||||
<el-table-column prop="operatorTime" 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 class=""> |
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick"> |
|
||||
<el-tab-pane name="first" label="入库明细"> |
|
||||
<el-table :data="goodsDetailList" border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" /> |
|
||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> |
|
||||
<el-table-column prop="goodsBarCode" label="商品条码" align="center" /> |
|
||||
<el-table-column prop="specValue" label="规格值" align="center" /> |
|
||||
<el-table-column prop="boxBarCode" label="箱条码" align="center" /> |
|
||||
<el-table-column prop="boxSpc" label="箱规格" align="center" /> |
|
||||
<el-table-column prop="unit" label="单位" align="center" /> |
|
||||
<el-table-column prop="price" label="成本单价" align="center" /> |
|
||||
<el-table-column prop="totalPrice" label="总价" align="center" /> |
|
||||
<el-table-column prop="count" label="数量" align="center" /> |
|
||||
<el-table-column prop="auxiliaryUnit" label="辅助单位" align="center" /> |
|
||||
<el-table-column prop="serialNumber" label="序列号" align="center" /> |
|
||||
<el-table-column prop="batchNumber" label="生产批次号" align="center" /> |
|
||||
<el-table-column prop="warehouseRackName" label="入库库位" align="center" /> |
|
||||
<el-table-column prop="remarks" label="明细备注" align="center" /> |
|
||||
</el-table> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="two" label="单据备注"> |
|
||||
<el-form ref="dataForm" class="formaddcopy02" :model="billRemarks"> |
|
||||
<el-row class="first_row"> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">买家留言</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ billRemarks.buyerMessage }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">备注</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ billRemarks.reamrks }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">系统备注</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ billRemarks.systemRemarks }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
|
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="three" label="操作日志"> |
|
||||
<el-table :data="operationList" border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="createTime" label="操作时间" width="250" align="center" /> |
|
||||
<el-table-column prop="userName" label="操作账号" width="180" align="center" /> |
|
||||
<el-table-column prop="content" label="操作内容" align="center" /> |
|
||||
</el-table> |
|
||||
</el-tab-pane> |
|
||||
|
|
||||
</el-tabs> |
|
||||
</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/inspectionGoods.js' |
|
||||
import req2 from '@/api/baseinfo/goodsShelves/goodsShelves.js' |
|
||||
import req3 from '@/api/goods/goods.js' |
|
||||
import req4 from '@/api/inStorage/deliveryNotice.js' |
|
||||
import req5 from '@/api/inStorage/receivingGoods.js' |
|
||||
import { |
|
||||
typeValues, |
|
||||
} from '@/api/Common/dictcommons' |
|
||||
import ButtonBar from '@/components/ButtonBar' |
|
||||
import Pagination from '@/components/pagination' |
|
||||
import pageye from '@/components/pagination/pageye' |
|
||||
import divAdd from './inspectionGoodsAdd.vue' |
|
||||
import divInfo from './inspectionGoodsInfo.vue' |
|
||||
export default { |
|
||||
components: { |
|
||||
ButtonBar, |
|
||||
Pagination, |
|
||||
pageye, |
|
||||
divAdd, |
|
||||
divInfo |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
activeName: "first", |
|
||||
activeIndex: "first", |
|
||||
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: 'plus', |
|
||||
// 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": "", //单据编号 |
|
||||
"billType": "1", //单据类型 0采购 1验货 |
|
||||
"externalNo": "", //外部单号 |
|
||||
"sourceBillNo": "", //来源单号(入库预约) |
|
||||
"warehouseRackSid": "", //库位sid |
|
||||
"storageTimeStart": "", //入库开始时间 |
|
||||
"storageTimeEnd": "", //入库结束时间 |
|
||||
"carrier": "", //承运商 |
|
||||
"waybillNumber": "", //运单号 |
|
||||
"goodsSkuSid": "", //商品sid |
|
||||
"shipper": "", //货主 |
|
||||
"menuUrl": "", //菜单路由 |
|
||||
"orgPath": "", //组织全路径sid |
|
||||
"userSid": "" //用户sid |
|
||||
} |
|
||||
}, |
|
||||
sids: [], |
|
||||
selectionList: [], |
|
||||
billStateList: [{ |
|
||||
name: "新建", |
|
||||
sid: "0" |
|
||||
}, |
|
||||
{ |
|
||||
name: "已完成", |
|
||||
sid: "1" |
|
||||
} |
|
||||
], |
|
||||
warehouseRackList: [], |
|
||||
goodsList: [], |
|
||||
goodsDetailList: [], |
|
||||
billRemarks: {}, |
|
||||
operationList: [] |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.$refs['btnbar'].setButtonList(this.btnList) |
|
||||
}, |
|
||||
created() { |
|
||||
this.init() |
|
||||
this.loadList() |
|
||||
}, |
|
||||
methods: { |
|
||||
init() { |
|
||||
|
|
||||
typeValues({ |
|
||||
type: 'receiveState' |
|
||||
}).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.billStateList = res.data |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
req2.warehouserackListAll({ |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath') |
|
||||
}).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.warehouseRackList = res.data |
|
||||
|
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
req3.getGoodsListAllByOrg({ |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath') |
|
||||
}).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.goodsList = res.data |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
handleClick(table) { |
|
||||
console.log("handleClick", table.name); |
|
||||
if (this.rowItemSid == '') { |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
showClose: true, |
|
||||
message: '暂无数据' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
this.activeIndex = table.name |
|
||||
// 入库明细 |
|
||||
if (table.name == 'first') { |
|
||||
this.goodsDetailList = [] |
|
||||
req5.selectByBillSid(this.rowItemSid).then((resp) => { |
|
||||
if (resp.success && resp.data != null) { |
|
||||
this.goodsDetailList = resp.data.list |
|
||||
} |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
// 单据备注 |
|
||||
if (table.name == 'two') { |
|
||||
this.billRemarks = {} |
|
||||
// req.orderRackDistributionDetail({ |
|
||||
// sid: this.rowItemSid |
|
||||
// }).then((resp) => { |
|
||||
|
|
||||
// if (resp.success && resp.data != null) { |
|
||||
// this.billRemarks = resp.data |
|
||||
// } |
|
||||
// }).catch(() => {}) |
|
||||
} |
|
||||
// 操作记录 |
|
||||
if (table.name == 'three') { |
|
||||
this.operationList = [] |
|
||||
req4.operationrecordDetails({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
if (resp.success && resp.data != null) { |
|
||||
this.operationList = resp.data |
|
||||
} |
|
||||
}).catch(() => {}) |
|
||||
|
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
rowItemClick(row) { |
|
||||
console.log("row", row); |
|
||||
|
|
||||
if (row.sid == '') { |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
showClose: true, |
|
||||
message: '暂无数据' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
this.rowItemSid = row.sid |
|
||||
var table = { |
|
||||
name: this.activeIndex |
|
||||
} |
|
||||
this.handleClick(table) |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
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 'toEdit': |
|
||||
this.toEdit() |
|
||||
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('orgSidPath') |
|
||||
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 |
|
||||
this.rowItemSid = '' |
|
||||
this.goodsDetailList = [] |
|
||||
this.billRemarks = {} |
|
||||
this.operationList = [] |
|
||||
this.rowItemClick(this.dataList[0]) |
|
||||
|
|
||||
} 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: { |
|
||||
"billNo": "", //单据编号 |
|
||||
"billType": "1", //单据类型 0采购 1验货 |
|
||||
"externalNo": "", //外部单号 |
|
||||
"sourceBillNo": "", //来源单号(入库预约) |
|
||||
"warehouseRackSid": "", //库位sid |
|
||||
"storageTimeStart": "", //入库开始时间 |
|
||||
"storageTimeEnd": "", //入库结束时间 |
|
||||
"carrier": "", //承运商 |
|
||||
"waybillNumber": "", //运单号 |
|
||||
"goodsSkuSid": "", //商品sid |
|
||||
"shipper": "", //货主 |
|
||||
"menuUrl": "", //菜单路由 |
|
||||
"orgPath": "", //组织全路径sid |
|
||||
"userSid": "" //用户sid |
|
||||
} |
|
||||
} |
|
||||
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 = 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> |
|
||||
/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,421 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<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="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><span class="addinputw addinputInfo">{{ formobj.billNo }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">制单人</div> |
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.operatorName }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">制单日期</div> |
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.operatorTime }}</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="storageTime"> <el-date-picker v-model="formobj.storageTime" type="date" |
|
||||
class="addinputw addinputInfo" value-format="yyyy-MM-dd" placeholder="选择日期"> |
|
||||
</el-date-picker></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty"><span class="must">*</span> 供应商</div> |
|
||||
<el-form-item prop="supplierName"> <el-select v-model="formobj.supplierName" filterable clearable |
|
||||
class="addinputw addinputInfo" @change="supplierNameSelect"> |
|
||||
<el-option v-for="item in supplierList" :key="item.sid" :label="item.supplierName" :value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">货主</div> |
|
||||
<el-form-item><el-input v-model="formobj.shipper" placeholder="" class="addinputw addinputInfo" |
|
||||
clearable /></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 titleOne"> |
|
||||
<div>商品列表</div> |
|
||||
<div> |
|
||||
<el-button type="primary" size="mini" class="btntopblueline" @click="seleGoods()">选择商品</el-button> |
|
||||
</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="delGoods(scope.$index)">删除</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="商品名称" prop="goodsSpuName" align="center" width="200" /> |
|
||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" /> |
|
||||
<el-table-column label="规格" prop="ownSpec" align="center" width="150" /> |
|
||||
<el-table-column label="单位" prop="goodsUnitName" align="center" width="120" /> |
|
||||
<el-table-column label="成本单价" prop="costPrice" align="center" width="120" /> |
|
||||
<el-table-column label="总价" prop="totalPrice" align="center" width="120" /> |
|
||||
<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,'')" |
|
||||
@input="commodityComputeYHAndXSJE(scope.row,$event)" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="库位" align="center" width="180"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-select v-model="scope.row.warehouseRackName" clearable placeholder="请选择" |
|
||||
@change="selectWarehouseAreaCode(scope.row,$event)"> |
|
||||
<el-option v-for="(item,i) in warehouseRackList" :key="i" :label="item.rackCode" :value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<!-- <el-table-column label="生产日期" align="center" width="180"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-date-picker v-model="scope.row.batch" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" |
|
||||
@change="manufactureDateChange(scope.row,$event)"> |
|
||||
</el-date-picker> |
|
||||
</template> |
|
||||
</el-table-column> --> |
|
||||
<el-table-column label="生产日期" prop="batch" align="center" width="150" /> |
|
||||
<el-table-column label="批次号" prop="batch" align="center" width="150" /> |
|
||||
<el-table-column label="明细备注" align="center" width="180"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-input ref="focusAssumptionInput" v-model="scope.row.remarks" clearable placeholder="" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
|
|
||||
</el-form> |
|
||||
</div> |
|
||||
</div> |
|
||||
<!-- 选择商品 --> |
|
||||
<chooseproducts v-show="viewState == 2" ref="divSp" @backData="backData" @doback="resetState" /> |
|
||||
|
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import req from '@/api/inStorage/inspectionGoods.js' |
|
||||
import req2 from '@/api/baseinfo/goodsShelves/goodsShelves.js' |
|
||||
import { |
|
||||
getCurrentDate |
|
||||
} from '@/utils/index.js' |
|
||||
import chooseproducts from './relation/chooseproducts' |
|
||||
import { |
|
||||
choiceSupplierInfo, |
|
||||
} from '@/api/Common/dictcommons' |
|
||||
export default { |
|
||||
components: { |
|
||||
chooseproducts, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
title: "【新增】", |
|
||||
viewState: 1, |
|
||||
listLoading: false, |
|
||||
submitdisabled: false, |
|
||||
formobj: { |
|
||||
"sid": "", |
|
||||
"userSid": window.sessionStorage.getItem('userSid'), |
|
||||
"operatorName": window.sessionStorage.getItem('name'), |
|
||||
"billNo": '', |
|
||||
"operatorTime": getCurrentDate(), |
|
||||
"storageTime": "", //入库时间 |
|
||||
"supplierName": "", |
|
||||
"supplierSid": "", |
|
||||
"shipper": "", |
|
||||
"useOrgSid": window.sessionStorage.getItem('defaultDeptSid'), //使用组织sid |
|
||||
"createOrgSid": window.sessionStorage.getItem('orgSid'), //创建组织sid |
|
||||
"remarks": "", //备注 |
|
||||
"list": [] |
|
||||
|
|
||||
}, |
|
||||
hideUploadBtn: false, |
|
||||
supplierList: [], |
|
||||
warehouseRackList: [], |
|
||||
rules: { |
|
||||
storageTime: [{ |
|
||||
required: true, |
|
||||
message: '入库时间不能为空', |
|
||||
trigger: 'change' |
|
||||
}], |
|
||||
supplierName: [{ |
|
||||
required: true, |
|
||||
message: '请选择供应商', |
|
||||
trigger: 'change' |
|
||||
}], |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
created() {}, |
|
||||
|
|
||||
methods: { |
|
||||
|
|
||||
init() { |
|
||||
var query = { |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath') |
|
||||
} |
|
||||
req2.warehouserackListAll(query).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.warehouseRackList = res.data |
|
||||
console.log("aaaaaa", this.warehouseRackList); |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
// 供应商 |
|
||||
choiceSupplierInfo({ |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSidPath') |
|
||||
}).then((resp) => { |
|
||||
if (resp.success) { |
|
||||
this.supplierList = resp.data |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
|
|
||||
indexMethod(index) { |
|
||||
return index + 1 |
|
||||
}, |
|
||||
saveOrUpdate() { |
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
|
||||
this.$refs['form_obj'].validate((valid) => { |
|
||||
if (valid) { |
|
||||
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 (Number(item.count) == 0) { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'error', |
|
||||
message: '商品数量不能为空或0' |
|
||||
}) |
|
||||
|
|
||||
return |
|
||||
} |
|
||||
|
|
||||
if (item.warehouseRackName == '' || item.warehouseRackSid == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'error', |
|
||||
message: '入库库位不能为空' |
|
||||
}) |
|
||||
|
|
||||
return |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
this.submitdisabled = true |
|
||||
req.saveInspection(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": "", |
|
||||
"userSid": window.sessionStorage.getItem('userSid'), |
|
||||
"operatorName": window.sessionStorage.getItem('name'), |
|
||||
"billNo": '', |
|
||||
"operatorTime": getCurrentDate(), |
|
||||
"storageTime": "", //入库时间 |
|
||||
"supplierName": "", |
|
||||
"supplierSid": "", |
|
||||
"shipper": "", |
|
||||
"useOrgSid": window.sessionStorage.getItem('defaultDeptSid'), //使用组织sid |
|
||||
"createOrgSid": window.sessionStorage.getItem('orgSid'), //创建组织sid |
|
||||
"remarks": "", //备注 |
|
||||
"list": [] |
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
this.$emit('doback') |
|
||||
}, |
|
||||
|
|
||||
showAdd() { |
|
||||
this.title = "【新增】" |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
this.init() |
|
||||
|
|
||||
}, |
|
||||
showEdit(row) { |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
this.init() |
|
||||
this.title = "【修改】" |
|
||||
var params = { |
|
||||
sid: row.sid |
|
||||
} |
|
||||
req.init(params) |
|
||||
.then(resp => { |
|
||||
if (resp.success) { |
|
||||
this.formobj = resp.data |
|
||||
|
|
||||
} |
|
||||
}) |
|
||||
.catch(e => { |
|
||||
this.formobj = {} |
|
||||
}) |
|
||||
}, |
|
||||
supplierNameSelect(val) { |
|
||||
console.log("supplierNameSelect", val); |
|
||||
const choose = this.supplierList.filter((item) => item.sid == val) |
|
||||
console.log('>>>>>>>>>supplierNameSelect', choose) |
|
||||
this.formobj.supplierName = choose[0].supplierName |
|
||||
this.formobj.supplierSid = 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].rackCode |
|
||||
row.warehouseRackSid = choose[0].sid |
|
||||
}, |
|
||||
backData(value) { |
|
||||
this.viewState = 1 |
|
||||
|
|
||||
this.formobj.list = value |
|
||||
|
|
||||
}, |
|
||||
resetState() { |
|
||||
this.viewState = 1 |
|
||||
}, |
|
||||
seleGoods() { |
|
||||
this.viewState = 2 |
|
||||
const aa = [] |
|
||||
this.$refs['divSp'].showData(aa, this.formobj.createOrgSid) |
|
||||
}, |
|
||||
delGoods(index) { |
|
||||
this.formobj.list.splice(index, 1) |
|
||||
}, |
|
||||
commodityComputeYHAndXSJE(row, val) { |
|
||||
row.totalPrice = (Number(row.costPrice) * Number(row.count)).toFixed(2) |
|
||||
|
|
||||
}, |
|
||||
manufactureDateChange(row, val) { |
|
||||
|
|
||||
console.log("manufactureDateChange》》》》", val) |
|
||||
|
|
||||
row.manufactureDate = val |
|
||||
var expirationDate = this.addDate(val, row.shelfLife) |
|
||||
|
|
||||
let reg = new RegExp('-', 'g') //g代表全部 |
|
||||
|
|
||||
row.batchNumber = this.formobj.deliveryDate.replace(reg, '') + " - " + 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 |
|
||||
}, |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</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,152 +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"> |
|
||||
<el-row class="first_row"> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">单据编号</div> |
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.billNo }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">制单人</div> |
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.operatorName }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">制单日期</div> |
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.operatorTime }}</span> |
|
||||
</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.storageTime }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">供应商</div> |
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.supplierName }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">货主</div> |
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.shipper }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="24"> |
|
||||
<div class="span-sty">备注</div> |
|
||||
<el-form-item><span class="addinputw 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 width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" /> |
|
||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" /> |
|
||||
<el-table-column label="规格" prop="specValue" align="center" /> |
|
||||
<el-table-column label="单位" prop="unit" align="center" /> |
|
||||
<el-table-column label="成本单价" prop="price" align="center" /> |
|
||||
<el-table-column label="总价" prop="totalPrice" align="center" /> |
|
||||
<el-table-column label="商品数量" prop="count" align="center" /> |
|
||||
<el-table-column label="库位" prop="warehouseRackName" align="center" /> |
|
||||
<el-table-column label="生产日期" prop="batchNumber" align="center" /> |
|
||||
<el-table-column label="批次号" prop="batchNumber" align="center" /> |
|
||||
<el-table-column label="明细备注" prop="remarks" align="center" /> |
|
||||
</el-table> |
|
||||
|
|
||||
</el-form> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import req from '@/api/inStorage/receivingGoods.js' |
|
||||
export default { |
|
||||
components: {}, |
|
||||
data() { |
|
||||
return { |
|
||||
listLoading: false, |
|
||||
formobj: {}, |
|
||||
} |
|
||||
}, |
|
||||
created() {}, |
|
||||
methods: { |
|
||||
indexMethod(index) { |
|
||||
return index + 1 |
|
||||
}, |
|
||||
handleReturn(isreload) { |
|
||||
if (isreload === 'true') this.$emit('reloadlist') |
|
||||
this.formobj = { |
|
||||
|
|
||||
} |
|
||||
this.$emit('doback') |
|
||||
}, |
|
||||
showAdd() {}, |
|
||||
showEdit(row) { |
|
||||
req.selectByBillSid(row.sid) |
|
||||
.then(resp => { |
|
||||
if (resp.success) { |
|
||||
this.formobj = resp.data |
|
||||
} |
|
||||
}) |
|
||||
.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,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> |
|
||||
<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="ownSpec" label="规格" align="center" /> |
|
||||
<el-table-column prop="goodsUnitName" 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 req from '@/api/inStorage/inspectionGoods.js' |
|
||||
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: '', |
|
||||
}, |
|
||||
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 |
|
||||
req.getGoodsSelectList(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.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,277 +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"><span class="must">*</span> 入库日期</div> |
|
||||
<el-form-item prop="storageTime"> <el-date-picker v-model="formobj.storageTime" type="date" |
|
||||
class="addinputw 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><el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" |
|
||||
clearable /></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="操作" align="center" width="80"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button type="primary" size="mini" @click="toDelGoods(scope.$index)">删除</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<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" /> |
|
||||
<el-table-column label="单位" prop="unit" align="center" /> |
|
||||
<el-table-column label="成本单价" align="center" width="150"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE1(scope.row)" |
|
||||
v-model="scope.row.price" clearable placeholder="" |
|
||||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="总价" prop="totalPrice" align="center" /> |
|
||||
<el-table-column label="预约单号" prop="yyCode" align="center" /> |
|
||||
<el-table-column label="预约数量" prop="orderCount" align="center" /> |
|
||||
<el-table-column label="可入库数量" prop="waitInCount" align="center" /> |
|
||||
<el-table-column label="入库数量" align="center" width="120"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE2(scope.row)" |
|
||||
v-model="scope.row.count" clearable placeholder="" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="生产批次号" prop="batch" align="center" /> |
|
||||
<el-table-column label="入库库位" align="center" width="180"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-select v-model="scope.row.warehouseRackCode" clearable placeholder="请选择" |
|
||||
@focus="getWarehouseAreaList(scope.row.warehouseSid)" |
|
||||
@change="selectWarehouseAreaCode(scope.row,$event)"> |
|
||||
<el-option v-for="(item,i) in warehouseRackList" :key="i" :label="item.rackCode" :value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="明细备注" align="center" width="180"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-input ref="focusAssumptionInput" v-model="scope.row.remarks" clearable placeholder="" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
|
|
||||
</el-form> |
|
||||
|
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import req from '@/api/inStorage/receivingGoods.js' |
|
||||
import req2 from '@/api/baseinfo/goodsShelves/goodsShelves.js' |
|
||||
export default { |
|
||||
components: {}, |
|
||||
data() { |
|
||||
return { |
|
||||
listLoading: false, |
|
||||
submitdisabled: false, |
|
||||
formobj: { |
|
||||
useOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
storageTime: "", |
|
||||
remarks: "", |
|
||||
list: [] |
|
||||
}, |
|
||||
rules: { |
|
||||
storageTime: [{ |
|
||||
required: true, |
|
||||
message: '入库日期不能为空', |
|
||||
trigger: 'change' |
|
||||
}], |
|
||||
}, |
|
||||
warehouseRackList: [] |
|
||||
} |
|
||||
}, |
|
||||
methods: { |
|
||||
indexMethod(index) { |
|
||||
return index + 1 |
|
||||
}, |
|
||||
|
|
||||
handleReturn(isreload) { |
|
||||
this.formobj = { |
|
||||
useOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
storageTime: "", |
|
||||
remarks: "", |
|
||||
list: [] |
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
this.$emit('reloadlist') |
|
||||
}, |
|
||||
|
|
||||
showEdit(goodsList) { |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs['form_obj'].clearValidate() |
|
||||
}) |
|
||||
|
|
||||
this.formobj.list = JSON.parse(JSON.stringify(goodsList)) |
|
||||
|
|
||||
}, |
|
||||
toDelGoods(index) { |
|
||||
this.formobj.list.splice(index, 1) |
|
||||
}, |
|
||||
commodityComputeYHAndXSJE1(row) { |
|
||||
|
|
||||
row.totalPrice = (Number(row.price) * Number(row.orderCount)).toFixed(2) |
|
||||
|
|
||||
}, |
|
||||
commodityComputeYHAndXSJE2(row) { |
|
||||
|
|
||||
if (Number(row.count) > Number(row.waitInCount)) { |
|
||||
row.count = Number(row.waitInCount) |
|
||||
} |
|
||||
|
|
||||
}, |
|
||||
getWarehouseAreaList(sid) { |
|
||||
var query = { |
|
||||
ckSid: sid |
|
||||
} |
|
||||
req2.getWarehouseareas(query).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.warehouseRackList = res.data |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
selectWarehouseAreaCode(row, val) { |
|
||||
console.log("selectWarehouseAreaCode", val); |
|
||||
|
|
||||
const choose = this.warehouseRackList.filter((item) => item.sid == val) |
|
||||
console.log('>>>>>>>>>selectWarehouseAreaCode', choose) |
|
||||
row.warehouseRackCode = choose[0].rackCode |
|
||||
row.warehouseRackSid = choose[0].sid |
|
||||
|
|
||||
}, |
|
||||
saveOrUpdate() { |
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
|
||||
|
|
||||
|
|
||||
this.$refs['form_obj'].validate((valid) => { |
|
||||
if (valid) { |
|
||||
|
|
||||
for (var i = this.formobj.list.length - 1; i >= 0; i--) { |
|
||||
|
|
||||
var item = this.formobj.list[i] |
|
||||
|
|
||||
if (Number(item.price) == 0) { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '商品单价不能为0' |
|
||||
}) |
|
||||
return |
|
||||
|
|
||||
} |
|
||||
if (Number(item.count) == 0) { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '商品入库数量不能为0' |
|
||||
}) |
|
||||
return |
|
||||
|
|
||||
} |
|
||||
|
|
||||
if (item.warehouseRackSid == '' || item.warehouseRackCode == '') { |
|
||||
this.$message({ |
|
||||
showClose: true, |
|
||||
type: 'warning', |
|
||||
message: '商品入库库位不能为空' |
|
||||
}) |
|
||||
return |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
|
|
||||
req.createInStorageBill(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 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,181 +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.operatorName }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">操作时间</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.operatorTime }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
|
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">入库时间</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.storageTime }}</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.billNo }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
|
|
||||
<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.warehouseName }}</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.supplierName }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">承运商</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.carrier }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">运单号</div> |
|
||||
<el-form-item><span class="addinputInfo">{{ formobj.waybillNumber }}</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.total }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="16"> |
|
||||
<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" /> |
|
||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" /> |
|
||||
<el-table-column label="规格" prop="specValue" align="center" /> |
|
||||
<el-table-column label="单位" prop="unit" align="center" /> |
|
||||
<el-table-column label="成本单价" prop="price" align="center" /> |
|
||||
<el-table-column label="总价" prop="totalPrice" align="center" /> |
|
||||
<el-table-column label="数量" prop="count" align="center" /> |
|
||||
<el-table-column label="生产批次号" prop="batchNumber" align="center" /> |
|
||||
<el-table-column label="入库库位" prop="warehouseRackName" align="center" /> |
|
||||
<el-table-column label="明细备注" prop="remarks" align="center" /> |
|
||||
</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(row) { |
|
||||
var params = { |
|
||||
sid: row.sid |
|
||||
} |
|
||||
req.selectByBillSid(row.sid) |
|
||||
.then(resp => { |
|
||||
if (resp.success) { |
|
||||
this.formobj = resp.data |
|
||||
} |
|
||||
}) |
|
||||
.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> |
|
File diff suppressed because it is too large
@ -1,941 +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-input v-model="queryParams.params.externalNo" placeholder="" clearable /> |
|
||||
</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.warehouseRackSid" placeholder="请选择库位" style="width: 200px;"> |
|
||||
<el-option v-for="item in warehouseRackList" :key="item.sid" :label="item.rackCode" |
|
||||
:value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="入库时间"> |
|
||||
<el-date-picker v-model="queryParams.params.storageTimeStart" 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.storageTimeEnd" 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.carrier" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="运单号"> |
|
||||
<el-input v-model="queryParams.params.waybillNumber" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="商品"> |
|
||||
<el-select v-model="queryParams.params.goodsSkuSid" placeholder="请选择" style="width: 200px;"> |
|
||||
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" :value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="供应商"> |
|
||||
<el-select v-model="queryParams.params.supplierSid" placeholder="请选择" style="width: 200px;"> |
|
||||
<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> |
|
||||
<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> |
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
|
||||
</div> |
|
||||
<!-- End 项目列表头部 --> |
|
||||
<!-- Start 项目列表 --> |
|
||||
<div class=""> |
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
|
||||
@selection-change="selectionLineChangeHandle" @row-click="rowItemClick"> |
|
||||
<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="80"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="billState" width="100" label="状态" align="center" /> |
|
||||
<el-table-column prop="billNo" width="150" label="入库单号" align="center" /> |
|
||||
<el-table-column prop="sourceBillNo" width="150" label="预约单号" align="center" /> |
|
||||
<el-table-column prop="total" width="100" label="商品总额" align="center" /> |
|
||||
<el-table-column prop="totalWeight" width="150" label="商品总重量(kg)" align="center" /> |
|
||||
<el-table-column prop="totalVolume" width="150" label="商品总体积(m³)" align="center" /> |
|
||||
<el-table-column prop="totalQuantity" width="100" label="商品总数" align="center" /> |
|
||||
<el-table-column prop="supplierName" width="180" label="供应商" align="center" /> |
|
||||
<el-table-column prop="carrier" width="180" label="承运商" align="center" /> |
|
||||
<el-table-column prop="waybillNumber" width="120" label="运单号" align="center" /> |
|
||||
<el-table-column prop="externalNo" width="150" label="外部单号" align="center" /> |
|
||||
<el-table-column prop="remarks" min-width="180" label="单据备注" align="center" /> |
|
||||
<el-table-column prop="storageTime" width="120" label="入库时间" align="center" /> |
|
||||
<el-table-column prop="operatorName" width="120" label="操作员" align="center" /> |
|
||||
<el-table-column prop="operatorTime" width="120" 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 class=""> |
|
||||
<el-tabs v-model="activeName" type="border-card"> |
|
||||
<el-tab-pane name="first" label="入库明细"> |
|
||||
<el-table :data="goodsDetailList" border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" /> |
|
||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> |
|
||||
<el-table-column prop="goodsBarCode" label="商品条码" align="center" /> |
|
||||
<el-table-column prop="specValue" label="规格值" align="center" /> |
|
||||
<el-table-column prop="boxBarCode" label="箱条码" align="center" /> |
|
||||
<el-table-column prop="boxSpc" label="箱规格" align="center" /> |
|
||||
<el-table-column prop="unit" label="单位" align="center" /> |
|
||||
<el-table-column prop="price" label="成本单价" align="center" /> |
|
||||
<el-table-column prop="totalPrice" label="总价" align="center" /> |
|
||||
<el-table-column prop="count" label="数量" align="center" /> |
|
||||
<el-table-column prop="auxiliaryUnit" label="辅助单位" align="center" /> |
|
||||
<el-table-column prop="serialNumber" label="序列号" align="center" /> |
|
||||
<el-table-column prop="batchNumber" label="生产批次号" align="center" /> |
|
||||
<el-table-column prop="warehouseRackName" label="入库库位" align="center" /> |
|
||||
<el-table-column prop="remarks" label="明细备注" align="center" /> |
|
||||
</el-table> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="second" label="单据备注"> |
|
||||
<el-form ref="dataForm" class="formaddcopy02" :model="billRemarks"> |
|
||||
<el-row class="first_row"> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">买家留言</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ billRemarks.buyerMessage }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">备注</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ billRemarks.reamrks }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">系统备注</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ billRemarks.systemRemarks }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
|
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="operationList" label="操作日志"> |
|
||||
<el-table :data="operationList" border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="createTime" label="操作时间" width="250" align="center" /> |
|
||||
<el-table-column prop="userName" label="操作账号" width="180" align="center" /> |
|
||||
<el-table-column prop="content" label="操作内容" align="center" /> |
|
||||
</el-table> |
|
||||
</el-tab-pane> |
|
||||
|
|
||||
</el-tabs> |
|
||||
</div> |
|
||||
|
|
||||
|
|
||||
<!-- <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" |
|
||||
text-color="#666" active-text-color="white"> |
|
||||
|
|
||||
<el-menu-item index="1">入库明细</el-menu-item> |
|
||||
<el-menu-item index="2">单据备注</el-menu-item> |
|
||||
<el-menu-item index="3">操作记录</el-menu-item> |
|
||||
</el-menu> |
|
||||
|
|
||||
<div v-show="activeIndex=='1'" style="margin-bottom: 50px;"> |
|
||||
<el-table :data="goodsDetailList" border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="goodsName" label="商品名称" align="center" /> |
|
||||
<el-table-column prop="goodsCode" label="商品编码" align="center" /> |
|
||||
<el-table-column prop="goodsBarCode" label="商品条码" align="center" /> |
|
||||
<el-table-column prop="goodsSpc" label="规格值" align="center" /> |
|
||||
<el-table-column prop="boxBarCode" label="箱条码" align="center" /> |
|
||||
<el-table-column prop="boxSpc" label="箱规格" align="center" /> |
|
||||
<el-table-column prop="unit" label="单位" align="center" /> |
|
||||
<el-table-column prop="costPrice" label="成本单价" align="center" /> |
|
||||
<el-table-column prop="totalPrice" label="总价" align="center" /> |
|
||||
<el-table-column prop="count" label="数量" align="center" /> |
|
||||
<el-table-column prop="auxiliaryUnit" label="辅助单位" align="center" /> |
|
||||
<el-table-column prop="serialNumber" label="序列号" align="center" /> |
|
||||
<el-table-column prop="batchNumber" label="生产批次号" align="center" /> |
|
||||
<el-table-column prop="warehouserack" label="入库库位" align="center" /> |
|
||||
<el-table-column prop="remarks" label="明细备注" align="center" /> |
|
||||
</el-table> |
|
||||
</div> |
|
||||
|
|
||||
<div v-show="activeIndex=='2'" style="margin-bottom: 50px;"> |
|
||||
|
|
||||
<el-form ref="dataForm" class="formaddcopy02" :model="billRemarks"> |
|
||||
<el-row class="first_row"> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">买家留言</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ billRemarks.buyerMessage }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">备注</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ billRemarks.reamrks }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">系统备注</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ billRemarks.systemRemarks }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
|
|
||||
</div> |
|
||||
<div v-show="activeIndex=='3'" style="margin-bottom: 50px;"> |
|
||||
<el-table :data="operationList" border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="times" label="操作时间" width="250" align="center" /> |
|
||||
<el-table-column prop="name" label="操作账号" width="180" align="center" /> |
|
||||
<el-table-column prop="centent" label="操作内容" align="center" /> |
|
||||
</el-table> |
|
||||
</div> --> |
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
<!-- End 查询和其列表部分 --> |
|
||||
<!-- 新增修改部分组件 --> |
|
||||
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState1" @reloadlist="loadList1" /> |
|
||||
<divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" /> |
|
||||
|
|
||||
<el-dialog title="选择预约单" :visible.sync="dialogVisible" :before-close="handleClose" |
|
||||
style="width:150%;margin-left: -20%;"> |
|
||||
<el-form :inline="true" style="margin-top: -30px;"> |
|
||||
<el-form-item label="外部单号"> |
|
||||
<el-input v-model="dialogParams.params.sourceBillNo" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="入库状态"> |
|
||||
<el-select v-model="dialogParams.params.billState" placeholder="请选择" style="width: 200px;"> |
|
||||
<el-option v-for="(item,i) in billStateList" :key="item.dictKey" :label="item.dictValue" |
|
||||
:value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="供应商"> |
|
||||
<el-select v-model="dialogParams.params.supplierSid" placeholder="请选择" style="width: 200px;"> |
|
||||
<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-date-picker v-model="dialogParams.params.inStotageStartTime" type="date" placeholder="选择日期" |
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
|
||||
</el-date-picker>至 |
|
||||
<el-date-picker v-model="dialogParams.params.inStotageEndTime" 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="dialogParams.params.goodsSkuSid" placeholder="请选择" style="width: 200px;"> |
|
||||
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" :value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item style="margin-left: 50px;"> |
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch1">查询</el-button> |
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery1">重置</el-button> |
|
||||
</el-form-item> |
|
||||
<!-- <div class="btn" style="text-align: center;margin-bottom: 30px;"> |
|
||||
<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> --> |
|
||||
|
|
||||
</el-form> |
|
||||
|
|
||||
<el-table :data="billList" border style="width: 100%" @selection-change="handleSelectionChange" ref="main" |
|
||||
@select-all="mainSelectAll" @select="mainSelect"> |
|
||||
<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 type="expand"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-table :data="scope.row.warehouseAnsBillDetails" border stripe size="small" :ref="'sub' + scope.$index" |
|
||||
@select="subSelect" @select-all="subSelectAll(scope.$index,$event)"> |
|
||||
<el-table-column type="selection" width="100" align="center" :selectable="checkSelectable" /> |
|
||||
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" show-overflow-tooltip /> |
|
||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" show-overflow-tooltip /> |
|
||||
<!-- <el-table-column prop="goodsBarCode" label="商品条码" align="center" show-overflow-tooltip /> --> |
|
||||
|
|
||||
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" show-overflow-tooltip /> |
|
||||
<!-- <el-table-column prop="goodsSpc" label="规格值" align="center" show-overflow-tooltip /> --> |
|
||||
<el-table-column prop="unit" label="单位" align="center" show-overflow-tooltip /> |
|
||||
<el-table-column prop="orderCount" label="预约数量" align="center" show-overflow-tooltip /> |
|
||||
<el-table-column prop="waitInCount" label="待入库数量" align="center" show-overflow-tooltip /> |
|
||||
<el-table-column prop="actualInCount" label="实际入库数量" align="center" show-overflow-tooltip /> |
|
||||
</el-table> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
|
|
||||
<el-table-column prop="billStateValue" label="状态" align="center" /> |
|
||||
<el-table-column prop="applicationTime" label="申请时间" align="center" /> |
|
||||
<el-table-column prop="billNo" label="单据编码" align="center" /> |
|
||||
<el-table-column prop="warehouseName" label="仓库" align="center" /> |
|
||||
<el-table-column prop="supplierName" label="供应商" align="center" /> |
|
||||
<el-table-column prop="warehouseRackCode" label="入库库位" align="center" /> |
|
||||
<el-table-column prop="sourceBillNo" label="外部单号" align="center" /> |
|
||||
<el-table-column prop="remarks" label="单据备注" align="center" /> |
|
||||
<el-table-column prop="applicant" label="申请人" align="center" /> |
|
||||
<el-table-column prop="contact" label="联系电话" align="center" /> |
|
||||
<el-table-column prop="mobile" label="联系人" align="center" /> |
|
||||
</el-table> |
|
||||
|
|
||||
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;"> |
|
||||
<el-button type="primary" style="margin-top: 20px;" @click="saveData">确 定</el-button> |
|
||||
</div> |
|
||||
|
|
||||
</el-dialog> |
|
||||
|
|
||||
|
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import req from '@/api/inStorage/receivingGoods.js' |
|
||||
import req4 from '@/api/inStorage/deliveryNotice.js' |
|
||||
import req2 from '@/api/baseinfo/goodsShelves/goodsShelves.js' |
|
||||
import req3 from '@/api/goods/goods.js' |
|
||||
import ButtonBar from '@/components/ButtonBar' |
|
||||
import Pagination from '@/components/pagination' |
|
||||
import pageye from '@/components/pagination/pageye' |
|
||||
import divAdd from './inStorageAdd.vue' |
|
||||
import divInfo from './inStorageInfo.vue' |
|
||||
import { |
|
||||
// getTypeValueList, |
|
||||
typeValues, |
|
||||
choiceSupplierInfo |
|
||||
} from '@/api/Common/dictcommons' |
|
||||
export default { |
|
||||
components: { |
|
||||
ButtonBar, |
|
||||
Pagination, |
|
||||
pageye, |
|
||||
divAdd, |
|
||||
divInfo, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
activeName: "first", |
|
||||
activeIndex: "1", |
|
||||
dialogVisible: false, |
|
||||
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: 'success', |
|
||||
size: 'small', |
|
||||
icon: 'export', |
|
||||
btnKey: 'toPrintBill', |
|
||||
btnLabel: '打印采购单' |
|
||||
}, |
|
||||
{ |
|
||||
type: 'success', |
|
||||
size: 'small', |
|
||||
icon: 'export', |
|
||||
btnKey: 'toPrintCode', |
|
||||
btnLabel: '打印条码' |
|
||||
}, |
|
||||
{ |
|
||||
type: 'success', |
|
||||
size: 'small', |
|
||||
icon: 'export', |
|
||||
btnKey: 'toBuild', |
|
||||
btnLabel: '导出' |
|
||||
}, |
|
||||
{ |
|
||||
type: 'info', |
|
||||
size: 'small', |
|
||||
icon: 'cross', |
|
||||
btnKey: 'doClose', |
|
||||
btnLabel: '关闭' |
|
||||
} |
|
||||
], |
|
||||
queryParams: { |
|
||||
current: 1, |
|
||||
size: 10, |
|
||||
total: 0, |
|
||||
params: { |
|
||||
"billNo": "", //单据编号 |
|
||||
"billType": "0", //单据类型 0采购 1验货 |
|
||||
"externalNo": "", //外部单号 |
|
||||
"sourceBillNo": "", //来源单号(入库预约) |
|
||||
"warehouseRackSid": "", //库位sid |
|
||||
"storageTimeStart": "", //入库开始时间 |
|
||||
"storageTimeEnd": "", //入库结束时间 |
|
||||
"carrier": "", //承运商 |
|
||||
"waybillNumber": "", //运单号 |
|
||||
"goodsSkuSid": "", //商品sid |
|
||||
"shipper": "", //货主 |
|
||||
"menuUrl": "", //菜单路由 |
|
||||
"orgPath": "", //组织全路径sid |
|
||||
"userSid": "" //用户sid |
|
||||
} |
|
||||
}, |
|
||||
sids: [], |
|
||||
selectionList: [], |
|
||||
warehouseRackList: [], |
|
||||
goodsList: [], |
|
||||
supplierList: [], |
|
||||
goodsDetailList: [], |
|
||||
billRemarks: {}, |
|
||||
operationList: [], |
|
||||
billStateList: [], |
|
||||
billList: [], |
|
||||
subGoods: [], |
|
||||
dialogParams: { |
|
||||
current: 1, |
|
||||
size: 10, |
|
||||
total: 0, |
|
||||
params: { |
|
||||
"sourceBillNo": "", |
|
||||
"inStotageStartTime": "", |
|
||||
"inStotageEndTime": "", |
|
||||
"goodsSkuSid": "", |
|
||||
"supplierSid": "", |
|
||||
"menuUrl": "", |
|
||||
"orgPath": "", |
|
||||
"userSid": "" |
|
||||
} |
|
||||
}, |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.$refs['btnbar'].setButtonList(this.btnList) |
|
||||
}, |
|
||||
created() { |
|
||||
this.init() |
|
||||
this.loadList() |
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
init() { |
|
||||
|
|
||||
typeValues({ |
|
||||
type: 'receiveState' |
|
||||
}).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.billStateList = res.data |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
req2.warehouserackListAll({ |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath') |
|
||||
}).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.warehouseRackList = res.data |
|
||||
|
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
|
|
||||
req3.getGoodsListAllByOrg({ |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath') |
|
||||
}).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.goodsList = res.data |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
// 供应商 |
|
||||
choiceSupplierInfo({ |
|
||||
createOrgSid: window.sessionStorage.getItem('orgSidPath') |
|
||||
}).then((resp) => { |
|
||||
if (resp.success) { |
|
||||
this.supplierList = resp.data |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
rowItemClick(row) { |
|
||||
console.log("row", row); |
|
||||
this.rowItemSid = row.sid |
|
||||
|
|
||||
if (this.rowItemSid == '') { |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
showClose: true, |
|
||||
message: '暂无数据' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
// this.rowItemSid = row.sid |
|
||||
this.goodsDetailList = [] |
|
||||
this.billRemarks = {} |
|
||||
this.operationList = [] |
|
||||
req.selectByBillSid(row.sid).then((resp) => { |
|
||||
this.goodsDetailList = resp.data.list |
|
||||
}).catch(() => {}) |
|
||||
|
|
||||
var parpams = { |
|
||||
sid: this.rowItemSid |
|
||||
} |
|
||||
req4.operationrecordDetails(parpams).then((resp) => { |
|
||||
this.operationList = resp.data |
|
||||
}).catch(() => {}) |
|
||||
|
|
||||
// this.handleSelect(this.activeIndex) |
|
||||
}, |
|
||||
|
|
||||
handleSelect(val) { |
|
||||
console.log("val", val); |
|
||||
this.activeIndex = 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 'toPrintBill': |
|
||||
this.toPrintBill() |
|
||||
break |
|
||||
case 'toPrintCode': |
|
||||
this.toPrintCode() |
|
||||
break |
|
||||
case 'toBuild': |
|
||||
this.toBuild() |
|
||||
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('orgSidPath') |
|
||||
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 |
|
||||
this.rowItemClick(this.dataList[0]) |
|
||||
} 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: { |
|
||||
"billNo": "", //单据编号 |
|
||||
"billType": "0", //单据类型 0采购 1验货 |
|
||||
"externalNo": "", //外部单号 |
|
||||
"sourceBillNo": "", //来源单号(入库预约) |
|
||||
"warehouseRackSid": "", //库位sid |
|
||||
"storageTimeStart": "", //入库开始时间 |
|
||||
"storageTimeEnd": "", //入库结束时间 |
|
||||
"carrier": "", //承运商 |
|
||||
"waybillNumber": "", //运单号 |
|
||||
"goodsSkuSid": "", //商品sid |
|
||||
"shipper": "", //货主 |
|
||||
"menuUrl": "", //菜单路由 |
|
||||
"orgPath": "", //组织全路径sid |
|
||||
"userSid": "" //用户sid |
|
||||
} |
|
||||
} |
|
||||
this.loadList() |
|
||||
}, |
|
||||
toAdd() { |
|
||||
|
|
||||
this.dialogParams.params.userSid = window.sessionStorage.getItem('userSid') |
|
||||
this.dialogParams.params.orgPath = window.sessionStorage.getItem('orgSidPath') |
|
||||
this.dialogParams.params.menuUrl = this.$route.path |
|
||||
req.getReservationBill(this.dialogParams).then((resp) => { |
|
||||
console.log("rgetReservationBill>>>>>", resp) |
|
||||
if (resp.success) { |
|
||||
this.billList = resp.data.records |
|
||||
this.dialogVisible = true |
|
||||
} |
|
||||
}).catch(() => {}) |
|
||||
|
|
||||
|
|
||||
}, |
|
||||
toPrintBill() { |
|
||||
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]) |
|
||||
}, |
|
||||
toPrintCode(row) { |
|
||||
this.viewState = 3 |
|
||||
this.$refs['divadd'].showEdit(row) |
|
||||
|
|
||||
}, |
|
||||
toBuild(row) { |
|
||||
this.viewState = 4 |
|
||||
this.$refs['divinfo'].showEdit(row) |
|
||||
}, |
|
||||
doClose() { |
|
||||
this.$store.dispatch('tagsView/delView', this.$route) |
|
||||
this.$router.go(-1) |
|
||||
}, |
|
||||
toRelevancy(row) { |
|
||||
this.viewState = 4 |
|
||||
this.$refs['divinfo'].showAdd(row) |
|
||||
}, |
|
||||
resetState() { |
|
||||
this.viewState = 1 |
|
||||
}, |
|
||||
|
|
||||
handleSelectionChange() { |
|
||||
|
|
||||
}, |
|
||||
//主table全选 |
|
||||
mainSelectAll(selection) { |
|
||||
console.log("selection", selection) |
|
||||
var datas = this.$refs.main.data; |
|
||||
datas.forEach((item, index) => { |
|
||||
|
|
||||
this.$refs['main'].toggleRowExpansion(item, true) |
|
||||
|
|
||||
item.check = selection.length != 0 |
|
||||
|
|
||||
item.warehouseAnsBillDetails.forEach((childItem) => { |
|
||||
|
|
||||
if (Number(childItem.waitInCount) != 0) { |
|
||||
childItem.check = selection.length != 0 |
|
||||
|
|
||||
this.$nextTick(() => { |
|
||||
this.$refs[`sub${index}`].toggleRowSelection(childItem, selection.length != 0); |
|
||||
|
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
|
|
||||
|
|
||||
}) |
|
||||
}, |
|
||||
//主table的单选 |
|
||||
mainSelect(selection, row) { |
|
||||
console.log("selection", selection) |
|
||||
console.log("row", row) |
|
||||
|
|
||||
const selectIndex = this.billList.findIndex((choose) => choose.sid == row.sid) |
|
||||
let selected = selection.length != 0 && selection.indexOf(row) != -1; |
|
||||
//为true时选中,为 0 时(false)未选中 |
|
||||
|
|
||||
row.check = selected |
|
||||
this.$refs['main'].toggleRowExpansion(this.billList[selectIndex], true) |
|
||||
this.$refs.main.toggleRowSelection(this.billList[selectIndex], selected) |
|
||||
|
|
||||
row.warehouseAnsBillDetails.forEach((childItem) => { |
|
||||
if (Number(childItem.waitInCount) != 0) { |
|
||||
childItem.check = selected |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs[`sub${selectIndex}`].toggleRowSelection(childItem, selected); |
|
||||
|
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
checkSelectable(row) { |
|
||||
return Number(row.waitInCount) !== 0 |
|
||||
}, |
|
||||
//子表格勾选 --->联动一级表格 |
|
||||
subSelectAll(pIndex, selection) { |
|
||||
console.log("pIndex", pIndex) |
|
||||
console.log("selection", selection) |
|
||||
|
|
||||
let selected = selection.length != 0; |
|
||||
//为true时选中,为 0 时(false)未选中 |
|
||||
|
|
||||
this.$refs.main.toggleRowSelection(this.billList[pIndex], selected) |
|
||||
|
|
||||
this.billList[pIndex].warehouseAnsBillDetails.forEach((childItem) => { |
|
||||
if (Number(childItem.waitInCount) != 0) { |
|
||||
this.$refs[`sub${pIndex}`].toggleRowSelection(childItem, selected); |
|
||||
childItem.check = selected |
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
//子table单选 |
|
||||
subSelect(selection, row) { |
|
||||
|
|
||||
console.log("row", row) |
|
||||
console.log("selection", selection) |
|
||||
|
|
||||
const choose = this.billList.filter((choose) => choose.sid == row.sourceBillSid) |
|
||||
|
|
||||
let selected = selection.length && selection.indexOf(row) !== -1; |
|
||||
|
|
||||
row.check = selected |
|
||||
|
|
||||
|
|
||||
console.log("choose", choose) |
|
||||
|
|
||||
var chenked = true |
|
||||
|
|
||||
for (var i = 0; i < choose[0].warehouseAnsBillDetails.length; i++) { |
|
||||
|
|
||||
if (!choose[0].warehouseAnsBillDetails[i].check) { |
|
||||
chenked = false |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
// if (selection.length == 0) { |
|
||||
const selectIndex = this.billList.findIndex((item) => item.sid == row.sourceBillSid) |
|
||||
|
|
||||
this.$refs.main.toggleRowSelection(this.billList[selectIndex], chenked) |
|
||||
this.billList[selectIndex].check = chenked |
|
||||
// } |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
dosearch1() { |
|
||||
// console.log(" dosearch1", this.selectList); |
|
||||
|
|
||||
this.dialogParams.current = 1 |
|
||||
this.toAdd() |
|
||||
|
|
||||
|
|
||||
}, |
|
||||
resetQuery1() { |
|
||||
|
|
||||
this.dialogParams = { |
|
||||
current: 1, |
|
||||
size: 10, |
|
||||
total: 0, |
|
||||
params: { |
|
||||
"sourceBillNo": "", |
|
||||
"inStotageStartTime": "", |
|
||||
"inStotageEndTime": "", |
|
||||
"goodsSkuSid": "", |
|
||||
"supplierSid": "", |
|
||||
"menuUrl": "", |
|
||||
"orgPath": "", |
|
||||
"userSid": "" |
|
||||
} |
|
||||
} |
|
||||
this.toAdd() |
|
||||
|
|
||||
|
|
||||
}, |
|
||||
handleClose() { |
|
||||
this.dialogParams = { |
|
||||
current: 1, |
|
||||
size: 10, |
|
||||
total: 0, |
|
||||
params: { |
|
||||
"sourceBillNo": "", |
|
||||
"inStotageStartTime": "", |
|
||||
"inStotageEndTime": "", |
|
||||
"goodsSkuSid": "", |
|
||||
"supplierSid": "", |
|
||||
"menuUrl": "", |
|
||||
"orgPath": "", |
|
||||
"userSid": "" |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var datas = this.$refs.main.data; |
|
||||
if (datas.length > 0) { |
|
||||
this.$refs[`main`].clearSelection() |
|
||||
datas.forEach((item, index) => { |
|
||||
item.check = false |
|
||||
this.$refs['main'].toggleRowExpansion(item, true) |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs[`sub${index}`].clearSelection() |
|
||||
}) |
|
||||
if (item.warehouseAnsBillDetails != null || item.warehouseAnsBillDetails.length > 0) { |
|
||||
item.warehouseAnsBillDetails.forEach((childItem) => { |
|
||||
childItem.check = false |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
|
|
||||
this.dialogVisible = false |
|
||||
|
|
||||
}, |
|
||||
saveData() { |
|
||||
|
|
||||
this.subGoods = [] |
|
||||
var datas = this.$refs.main.data; |
|
||||
datas.forEach((item) => { |
|
||||
item.warehouseAnsBillDetails.forEach((childItem) => { |
|
||||
if (childItem.check && Number(childItem.waitInCount) != 0) { |
|
||||
this.subGoods.push(childItem) |
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
}) |
|
||||
console.log(" dosearch1", this.subGoods); |
|
||||
|
|
||||
if (this.subGoods.length == 0) { |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
message: "请先选择商品", |
|
||||
showClose: true |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
this.dialogVisible = false |
|
||||
this.viewState = 2 |
|
||||
this.$refs['divadd'].showEdit(this.subGoods) |
|
||||
|
|
||||
}, |
|
||||
resetState1() { |
|
||||
this.viewState = 1 |
|
||||
this.dialogVisible = true |
|
||||
}, |
|
||||
loadList1() { |
|
||||
this.viewState = 1 |
|
||||
this.dialogVisible = false |
|
||||
this.loadList() |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</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; |
|
||||
} |
|
||||
|
|
||||
.el-menu-item.is-active { |
|
||||
background-color: #3370ff !important; |
|
||||
color: #fff; |
|
||||
|
|
||||
span { |
|
||||
color: #fff; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.el-submenu__title.is-active { |
|
||||
background: #1c88cf !important; |
|
||||
color: #fff !important; |
|
||||
} |
|
||||
</style> |
|
File diff suppressed because it is too large
@ -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,997 +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.externalOrderNumber" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="承运商"> |
|
||||
<el-select v-model="queryParams.params.carrier" placeholder="请选择" style="width: 200px;"> |
|
||||
<el-option v-for="(item,i) in carrierList" :key="i" :label="item.dictValue" :value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="运单号"> |
|
||||
<el-input v-model="queryParams.params.waybillNumber" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="买家"> |
|
||||
<el-input v-model="queryParams.params.buyer" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="手机号"> |
|
||||
<el-input v-model="queryParams.params.mobile" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="详细地址"> |
|
||||
<el-input v-model="queryParams.params.address" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="出库类型"> |
|
||||
<el-select v-model="queryParams.params.outboundType" placeholder="请选择" style="width: 200px;"> |
|
||||
<el-option v-for="(item,i) in outboundTypeList" :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.orderTimeStart" 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.orderTimeEnd" 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> |
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
|
||||
</div> |
|
||||
<!-- End 项目列表头部 --> |
|
||||
<!-- Start 项目列表 --> |
|
||||
<div class=""> |
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
|
||||
@selection-change="selectionLineChangeHandle" @row-click="rowItemClick"> |
|
||||
<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="externalState" width="100" label="外部状态" align="center" /> |
|
||||
<el-table-column prop="billNo" width="120" label="订单号" align="center" /> |
|
||||
<el-table-column prop="externalOrderNumber" width="120" label="外部单号" align="center" /> |
|
||||
<el-table-column prop="onlineOrderNumber" width="120" label="线上订单号" align="center" /> |
|
||||
<el-table-column prop="paymentTime" width="160" label="付款时间" align="center" /> |
|
||||
<el-table-column prop="outboundType" width="120" label="出库类型" align="center" /> |
|
||||
<el-table-column prop="inventoryStatusValue" width="120" label="库存状态" align="center" /> |
|
||||
<el-table-column prop="shipper" width="100" label="货主" align="center" /> |
|
||||
<el-table-column label="承运商" align="center" width="150"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-select v-model="scope.row.carrier" placeholder="请选择" @change="selectCarrier(scope.row,$event)"> |
|
||||
<el-option v-for="(item,i) in carrierList" :key="i" :label="item.dictValue" :value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="运单号" align="center" min-width="200"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-input ref="" v-model="scope.row.waybillNumber" clearable placeholder="" |
|
||||
@change="itemWaybillNumber(scope.row)" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="deliveryMethod" width="100" label="配送方式" align="center" /> |
|
||||
<el-table-column prop="buyer" width="100" label="买家" align="center" /> |
|
||||
<el-table-column prop="consignee" width="100" label="收货人" align="center" /> |
|
||||
<el-table-column prop="address" width="200" label="详细地址" align="center" /> |
|
||||
<el-table-column prop="mobile" width="100" label="手机号" align="center" /> |
|
||||
<el-table-column prop="actualPayment" width="80" label="实付" align="center" /> |
|
||||
<el-table-column prop="discount" width="80" label="优惠" align="center" /> |
|
||||
<el-table-column prop="freight" min-width="80" label="运费" align="center" /> |
|
||||
<el-table-column prop="weight" width="80" label="重量" align="center" /> |
|
||||
<el-table-column prop="weightEstimation" width="80" label="估重" align="center" /> |
|
||||
<el-table-column prop="volume" width="80" label="体积" align="center" /> |
|
||||
<el-table-column prop="quantity" width="100" label="商品总数" align="center" /> |
|
||||
<el-table-column prop="orderTime" width="160" label="下单时间" align="center" /> |
|
||||
<el-table-column prop="deliveryTime" width="160" label="到货时间" align="center" /> |
|
||||
<el-table-column prop="latestDeliveryTime" width="160" 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 class=""> |
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick"> |
|
||||
<el-tab-pane name="first"> |
|
||||
<span slot="label">订单明细(共: {{from.first .length}} 笔)</span> |
|
||||
<el-table :data="from.first " border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="goodsSpuName" label="商品名称" width="120" align="center" /> |
|
||||
<el-table-column prop="goodsSkuCode" label="商品编码" width="120" align="center" /> |
|
||||
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" /> |
|
||||
<el-table-column prop="barCode" label="商品条码" width="120" align="center" /> |
|
||||
<el-table-column prop="unit" label="单位" align="center" /> |
|
||||
<el-table-column prop="price" label="单价" align="center" /> |
|
||||
<el-table-column prop="orderCount" label="数量" align="center" /> |
|
||||
<el-table-column prop="actualPrice" label="应收" align="center" /> |
|
||||
<el-table-column prop="salesAmount" label="实际成交单价" width="160" align="center" /> |
|
||||
<el-table-column prop="salesAmount" label="销售金额" width="160" align="center" /> |
|
||||
<el-table-column prop="serialNumber" label="序列号" align="center" /> |
|
||||
<el-table-column label="库位" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<div style="color: #1890FF; text-decoration: underline ; cursor:pointer;" |
|
||||
@click="showStock(scope.row)"> |
|
||||
{{scope.row.reackState}} |
|
||||
</div> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="batchNumber" label="指定批次号" width="160" align="center" /> |
|
||||
<el-table-column prop="dateOfManufacture" label="指定生产日期" width="160" align="center" /> |
|
||||
<el-table-column prop="expirationDate" label="指定过期日期" width="160" align="center" /> |
|
||||
<el-table-column prop="batchExpansion" label="指定批次扩展属性" width="160" align="center" /> |
|
||||
<el-table-column prop="remarks" label="明细备注" width="120" align="center" /> |
|
||||
</el-table> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="two" label="库位分配"> |
|
||||
<el-table :data="from.two" border style="width: 100%"> |
|
||||
<el-table-column width="60" 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="spec" label="规格" align="center" /> |
|
||||
<el-table-column prop="rackCode" label="库位编码" align="center" /> |
|
||||
<el-table-column prop="count" label="分配数量" align="center" /> |
|
||||
</el-table> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="three" label="收件地址"> |
|
||||
<el-form ref="consignee" :model="from.three" class="formaddcopy02"> |
|
||||
<el-row style="border-top: 1px solid #E0E3EB"> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">收货人</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ from.three.consignee }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">固话</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ from.three.fixedLine }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">手机号</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ from.three.mobile }}</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">{{ from.three.province }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">市</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ from.three.city }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">县</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ from.three.county }}</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">{{ from.three.address }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="four" label="发票信息"> |
|
||||
|
|
||||
<div style="display: flex;flex-direction: row;"> |
|
||||
|
|
||||
<div style="flex: 1;"> |
|
||||
<el-form ref="consignee" :model="from.four" class="formaddcopy02" style="margin-top: -10px;"> |
|
||||
<el-row style="border-top: 1px solid #E0E3EB"> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">发票类型</div> |
|
||||
<el-select v-model="from.four.invoiceTypeValue" placeholder="请选择" class="addinputInfo addinputw" |
|
||||
@change="selectInvoiceTypeChange"> |
|
||||
<el-option v-for="(item,i) in billingTypeList" :key="item.dictKey" :label="item.dictValue" |
|
||||
:value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">开票方</div> |
|
||||
<el-form-item> <el-input v-model="from.four.invoicingParty" placeholder="" clearable |
|
||||
class="addinputInfo addinputw" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">抬头</div> |
|
||||
|
|
||||
<el-form-item> <el-input v-model="from.four.rise" placeholder="" clearable |
|
||||
class="addinputInfo addinputw" /></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="totalQuantity" :readonly="true" placeholder="" clearable |
|
||||
class="addinputInfo addinputw" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">税号</div> |
|
||||
<el-form-item> <el-input v-model="from.four.dutyParagraph" placeholder="" clearable |
|
||||
class="addinputInfo addinputw" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">发票备注</div> |
|
||||
<el-form-item> <el-input v-model="from.four.remarks" placeholder="" clearable |
|
||||
class="addinputInfo addinputw" /></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="24"> |
|
||||
<div class="span-sty">内容类型</div> |
|
||||
<el-form-item> <el-radio-group v-model="from.four.contentType" size="small" |
|
||||
class="addinputInfo addinputw"> |
|
||||
<el-radio :label="'1'">发票商品</el-radio> |
|
||||
<el-radio :label="'2'">自定义明细</el-radio> |
|
||||
</el-radio-group></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<div style="text-align: center;margin-top: 5px"> |
|
||||
<el-button type="primary" size="small" @click="saveInvoice">保存</el-button> |
|
||||
</div> |
|
||||
</el-form> |
|
||||
|
|
||||
</div> |
|
||||
<div style="flex: 1;" v-show="from.four.contentType=='2'"> |
|
||||
<div style="margin-bottom: 5px"> |
|
||||
<el-button type="primary" size="small" @click="chooseGoods">选择商品</el-button> |
|
||||
</div> |
|
||||
<el-table :data="from.four.detailsList" border style="width: 100%"> |
|
||||
<el-table-column 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="delGoods(scope.$index)">删除</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="goodsSpuName" label="商品名称" align="center" /> |
|
||||
<el-table-column prop="unit" label="商品单位" align="center" /> |
|
||||
<el-table-column prop="price" label="商品单价" align="center" /> |
|
||||
<el-table-column prop="orderCount" label="数量" align="center" /> |
|
||||
<el-table-column prop="salesAmount" label="金额" align="center" /> |
|
||||
</el-table> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="five" label="备注/留言"> |
|
||||
<div style="display: flex;flex-direction: row;justify-content: flex-start;"> |
|
||||
<div style="width: 300px;"> |
|
||||
<div><el-divider direction="vertical"></el-divider><span style="font-weight: bold;">买家留言</span></div> |
|
||||
<div style="background-color: #f5f6f7;margin-top: 10px;min-height: 200px"> |
|
||||
<div style="margin-left: 15px"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div style="width: 300px;margin-left: 5px"> |
|
||||
<div><el-divider direction="vertical"></el-divider><span style="font-weight: bold;">线上备注</span></div> |
|
||||
<div style="background-color: #f5f6f7;margin-top: 10px;min-height: 200px"> |
|
||||
<div style="margin-left: 10px"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div style="width: 300px;margin-left: 5px"> |
|
||||
<div><el-divider direction="vertical"></el-divider><span style="font-weight: bold;">系统备注</span></div> |
|
||||
<div style="background-color: #f5f6f7;margin-top: 10px;min-height: 200px"> |
|
||||
<div style="margin-left: 10px"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="six" label="操作记录"> |
|
||||
<el-table :data="from.six" border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="createTime" label="操作时间" width="250" align="center" /> |
|
||||
<el-table-column prop="userName" label="操作账号" width="180" align="center" /> |
|
||||
<el-table-column prop="content" label="操作内容" align="center" /> |
|
||||
</el-table> |
|
||||
</el-tab-pane> |
|
||||
|
|
||||
</el-tabs> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<el-dialog title="选择商品" :visible.sync="dialogVisible" :before-close="handleClose" style="width:100%;"> |
|
||||
|
|
||||
<el-table :data="from.first" border style="width: 100%;margin-top: -20px" |
|
||||
@selection-change="handleSelectionChange" ref="main"> |
|
||||
<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="goodsSpuName" label="商品名称" align="center" /> |
|
||||
<el-table-column prop="unit" label="商品单位" align="center" /> |
|
||||
<el-table-column prop="price" label="商品单价" align="center" /> |
|
||||
<el-table-column prop="orderCount" label="数量" align="center" /> |
|
||||
<el-table-column prop="salesAmount" label="金额" align="center" /> |
|
||||
</el-table> |
|
||||
|
|
||||
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;"> |
|
||||
<el-button type="primary" style="margin-top: 20px;" @click="saveData">确 定</el-button> |
|
||||
</div> |
|
||||
|
|
||||
</el-dialog> |
|
||||
|
|
||||
<el-dialog title="库位分配选择" :visible.sync="dialogVisible2" :before-close="handleClose2" style="width:100%;"> |
|
||||
|
|
||||
<el-table :data="goodsStockList" border style="width: 100%;margin-top: -20px;" ref="main"> |
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="warehouseName" label="仓库" align="center" /> |
|
||||
<el-table-column prop="areaName" label="库区" align="center" /> |
|
||||
<el-table-column prop="rackName" label="库位" align="center" /> |
|
||||
<el-table-column prop="rackCode" label="库位编码" align="center" /> |
|
||||
<el-table-column prop="useCount" label="可用库存" align="center" /> |
|
||||
<el-table-column label="分配数量" align="center" min-width="200"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-input v-model="scope.row.count" clearable placeholder="" |
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
|
|
||||
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;"> |
|
||||
<el-button type="primary" style="margin-top: 20px;" @click="saveData2">确 定</el-button> |
|
||||
</div> |
|
||||
|
|
||||
</el-dialog> |
|
||||
|
|
||||
|
|
||||
|
|
||||
</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 './inStorageAdd.vue' |
|
||||
// import divInfo from './inStorageInfo.vue' |
|
||||
import { |
|
||||
// getTypeValueList, |
|
||||
typeValues, |
|
||||
} from '@/api/Common/dictcommons' |
|
||||
export default { |
|
||||
components: { |
|
||||
ButtonBar, |
|
||||
Pagination, |
|
||||
pageye, |
|
||||
// divAdd, |
|
||||
// divInfo, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
activeName: "first", |
|
||||
activeIndex: "first", |
|
||||
dialogVisible: false, |
|
||||
dialogVisible2: false, |
|
||||
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: 'success', |
|
||||
// size: 'small', |
|
||||
// icon: 'export', |
|
||||
// btnKey: 'toPrintBill', |
|
||||
// btnLabel: '改承运商' |
|
||||
// }, |
|
||||
// { |
|
||||
// type: 'success', |
|
||||
// size: 'small', |
|
||||
// icon: 'export', |
|
||||
// btnKey: 'toBuild', |
|
||||
// btnLabel: '生产电子面单' |
|
||||
// }, |
|
||||
{ |
|
||||
type: 'info', |
|
||||
size: 'small', |
|
||||
icon: 'cross', |
|
||||
btnKey: 'doClose', |
|
||||
btnLabel: '关闭' |
|
||||
} |
|
||||
], |
|
||||
queryParams: { |
|
||||
current: 1, |
|
||||
size: 10, |
|
||||
total: 0, |
|
||||
params: { |
|
||||
"billNo": "", |
|
||||
"externalOrderNumber": "", |
|
||||
"onlineOrderNumber": "", |
|
||||
"buyer": "", |
|
||||
"waybillNumber": "", |
|
||||
"platform": "", |
|
||||
"carrier": "", |
|
||||
"mobile": "", |
|
||||
"outboundType": "", |
|
||||
"address": "", |
|
||||
"orderTimeStart": "", |
|
||||
"orderTimeEnd": "", |
|
||||
"menuUrl": "", |
|
||||
"orgPath": "", |
|
||||
"userSid": "", |
|
||||
"billState": "3", //0 待分配 1零拣打单 2待出库 3已出库 |
|
||||
} |
|
||||
}, |
|
||||
sids: [], |
|
||||
selectionList: [], |
|
||||
rowItemSid: "", |
|
||||
billingTypeList: [], |
|
||||
carrierList: [], |
|
||||
outboundTypeList: [{ |
|
||||
sid: "1", |
|
||||
name: "销售出库" |
|
||||
}], |
|
||||
from: { |
|
||||
first: [], |
|
||||
two: [], |
|
||||
three: {}, |
|
||||
four: { |
|
||||
detailsList: [] |
|
||||
}, |
|
||||
five: {}, |
|
||||
six: [] |
|
||||
}, |
|
||||
goodsList: [], |
|
||||
goodsStockList: [] |
|
||||
|
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.$refs['btnbar'].setButtonList(this.btnList) |
|
||||
}, |
|
||||
created() { |
|
||||
this.init() |
|
||||
this.loadList() |
|
||||
}, |
|
||||
computed: { |
|
||||
// 开票金额 |
|
||||
totalQuantity() { |
|
||||
let quantity = 0 |
|
||||
if (this.from.four.detailsList.length > 0) { |
|
||||
this.from.four.detailsList.forEach((e) => { |
|
||||
quantity += Number(e.salesAmount) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
this.from.four.totalAmount = quantity |
|
||||
|
|
||||
return quantity |
|
||||
}, |
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
init() { |
|
||||
|
|
||||
typeValues({ |
|
||||
type: 'billingType' |
|
||||
}).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.billingTypeList = res.data |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
typeValues({ |
|
||||
type: 'carrier' |
|
||||
}).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.carrierList = res.data |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
handleClick(table) { |
|
||||
console.log("handleClick", table.name); |
|
||||
|
|
||||
if (this.rowItemSid == '') { |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
showClose: true, |
|
||||
message: '暂无数据' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
this.activeIndex = table.name |
|
||||
|
|
||||
// 订单明细 |
|
||||
if (table.name == 'first') { |
|
||||
this.from.first = [] |
|
||||
req.orderGoodsDetail({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
this.from.first = resp.data |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
// 库位分配 |
|
||||
if (table.name == 'two') { |
|
||||
this.from.two = [] |
|
||||
req.orderRackDistributionDetail({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
this.from.two = resp.data |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
// 收件地址 |
|
||||
if (table.name == 'three') { |
|
||||
this.from.three = {} |
|
||||
req.orderReceivingAddressDetail({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
this.from.three = resp.data |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
// 发票信息 |
|
||||
if (table.name == 'four') { |
|
||||
this.from.four = { |
|
||||
detailsList: [] |
|
||||
} |
|
||||
req.orderInvoiveDetail({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
this.from.four = resp.data |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
// 备注/留言 |
|
||||
if (table.name == 'five') { |
|
||||
this.from.five = {} |
|
||||
req.orderRemarksDetail({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
this.from.five = resp.data |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
// 操作记录 |
|
||||
if (table.name == 'six') { |
|
||||
this.from.six = [] |
|
||||
req.orderOperationDetail({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
this.from.six = resp.data |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
rowItemClick(row) { |
|
||||
console.log("row", row); |
|
||||
|
|
||||
if (row.sid == '') { |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
showClose: true, |
|
||||
message: '暂无数据' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
this.rowItemSid = row.sid |
|
||||
var table = { |
|
||||
name: this.activeIndex |
|
||||
} |
|
||||
this.handleClick(table) |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
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 'toPrintBill': |
|
||||
this.toPrintBill() |
|
||||
break |
|
||||
case 'toPrintCode': |
|
||||
this.toPrintCode() |
|
||||
break |
|
||||
case 'toBuild': |
|
||||
this.toBuild() |
|
||||
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('orgSidPath') |
|
||||
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 |
|
||||
this.rowItemSid = '' |
|
||||
this.from = { |
|
||||
first: [], |
|
||||
two: [], |
|
||||
three: {}, |
|
||||
four: { |
|
||||
detailsList: [] |
|
||||
}, |
|
||||
five: {}, |
|
||||
six: [] |
|
||||
} |
|
||||
this.rowItemClick(this.dataList[0]) |
|
||||
|
|
||||
} 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: { |
|
||||
"billNo": "", |
|
||||
"externalOrderNumber": "", |
|
||||
"onlineOrderNumber": "", |
|
||||
"buyer": "", |
|
||||
"waybillNumber": "", |
|
||||
"platform": "", |
|
||||
"carrier": "", |
|
||||
"mobile": "", |
|
||||
"outboundType": "", |
|
||||
"address": "", |
|
||||
"orderTimeStart": "", |
|
||||
"orderTimeEnd": "", |
|
||||
"menuUrl": "", |
|
||||
"orgPath": "", |
|
||||
"userSid": "", |
|
||||
"billState": "3", //0 待分配 1零拣打单 2待出库 3已出库 |
|
||||
} |
|
||||
} |
|
||||
this.loadList() |
|
||||
}, |
|
||||
toAdd() { |
|
||||
|
|
||||
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.toBePickOut(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({ |
|
||||
type: 'warning', |
|
||||
showClose: true, |
|
||||
message: '请至少选择一条记录进行操作' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
}, |
|
||||
toPrintBill() { |
|
||||
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]) |
|
||||
}, |
|
||||
toPrintCode(row) { |
|
||||
this.viewState = 3 |
|
||||
this.$refs['divadd'].showEdit(row) |
|
||||
|
|
||||
}, |
|
||||
toBuild(row) { |
|
||||
this.viewState = 4 |
|
||||
this.$refs['divinfo'].showEdit(row) |
|
||||
}, |
|
||||
doClose() { |
|
||||
this.$store.dispatch('tagsView/delView', this.$route) |
|
||||
this.$router.go(-1) |
|
||||
}, |
|
||||
toRelevancy(row) { |
|
||||
this.viewState = 4 |
|
||||
this.$refs['divinfo'].showAdd(row) |
|
||||
}, |
|
||||
resetState() { |
|
||||
this.viewState = 1 |
|
||||
}, |
|
||||
selectInvoiceTypeChange(val) { |
|
||||
|
|
||||
const choose = this.billingTypeList.filter((item) => item.dictKey == val) |
|
||||
console.log('>>>>>>>>>selectInvoiceTypeChange', choose) |
|
||||
this.from.four.invoiceType = choose[0].dictKey |
|
||||
this.from.four.invoiceTypeValue = choose[0].dictValue |
|
||||
}, |
|
||||
saveInvoice() { |
|
||||
req.saveOrderInvoive(this.from.four).then((resp) => { |
|
||||
if (res.success) { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '保存成功', |
|
||||
showClose: true |
|
||||
}) |
|
||||
} |
|
||||
}).catch(() => {}) |
|
||||
}, |
|
||||
chooseGoods() { |
|
||||
this.goodsList = [] |
|
||||
this.dialogVisible = true |
|
||||
|
|
||||
}, |
|
||||
handleClose() { |
|
||||
this.dialogVisible = false |
|
||||
}, |
|
||||
handleSelectionChange(val) { |
|
||||
console.log("val", val); |
|
||||
this.goodsList = val |
|
||||
}, |
|
||||
saveData() { |
|
||||
this.from.four.detailsList = this.goodsList |
|
||||
this.dialogVisible = false |
|
||||
}, |
|
||||
delGoods(index) { |
|
||||
this.from.four.detailsList.splice(index, 1) |
|
||||
}, |
|
||||
selectCarrier(row, val) { |
|
||||
console.log("selectCarrier", val); |
|
||||
|
|
||||
const choose = this.carrierList.filter((item) => item.dictKey == val) |
|
||||
console.log('>>>>>>>>>selectCarrier', choose) |
|
||||
row.carrierValue = choose[0].dictValue |
|
||||
row.carrierKey = choose[0].dictKey |
|
||||
|
|
||||
var query = { |
|
||||
sid: row.sid, |
|
||||
carrierValue: row.carrierValue, |
|
||||
carrierKey: row.carrierKey, |
|
||||
userSid: window.sessionStorage.getItem('userSid') |
|
||||
} |
|
||||
req.updateCarrier(query).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '保存成功', |
|
||||
showClose: true |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
}, |
|
||||
itemWaybillNumber(row) { |
|
||||
console.log("itemWaybillNumber", row); |
|
||||
|
|
||||
var query = { |
|
||||
sid: row.sid, |
|
||||
waybillNumber: row.waybillNumber, |
|
||||
userSid: window.sessionStorage.getItem('userSid') |
|
||||
} |
|
||||
req.updateWaybillNumber(query).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '保存成功', |
|
||||
showClose: true |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
showStock(row) { |
|
||||
console.log("showStock", row); |
|
||||
|
|
||||
req.selAvailableBySkuSid({ |
|
||||
skuSid: row.sid, |
|
||||
sourceBillSid: this.rowItemSid, |
|
||||
orgSid: window.sessionStorage.getItem('orgSid') |
|
||||
}).then((res) => { |
|
||||
console.log("selAvailableBySkuSid", res); |
|
||||
|
|
||||
if (res.success) { |
|
||||
this.goodsStockList = res.data |
|
||||
this.dialogVisible2 = true |
|
||||
|
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
}, |
|
||||
handleClose2() { |
|
||||
this.dialogVisible2 = false |
|
||||
}, |
|
||||
saveData2() { |
|
||||
console.log("saveData2", this.goodsStockList); |
|
||||
|
|
||||
var goodsStocks = [] |
|
||||
|
|
||||
for (var i = 0; i < this.goodsStockList.length; i++) { |
|
||||
|
|
||||
var item = this.goodsStockList[i] |
|
||||
|
|
||||
if (Number(item.count) > 0) { |
|
||||
|
|
||||
goodsStocks.push({ |
|
||||
"sid": item.locationSid, |
|
||||
"sourceBillSid": this.rowItemSid, |
|
||||
"goodsSkuSid": item.goodsSkuSid, |
|
||||
"goodsSpuName": item.goodsSpuName, |
|
||||
"goodsSpuTitle": "", |
|
||||
"goodsSkuCode": '', |
|
||||
"count": item.count, |
|
||||
"rackSid": item.rackSid, |
|
||||
"rackCode": item.rackCode, |
|
||||
"inventorySid": item.inventorySid, |
|
||||
"initialCount": item.initialCount, |
|
||||
"locationSid": item.locationSid, |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
req.saveSelAvailable(goodsStocks).then((res) => { |
|
||||
console.log("saveSelAvailable", res); |
|
||||
|
|
||||
if (res.success) { |
|
||||
this.dialogVisible2 = false |
|
||||
this.loadList() |
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
|
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
|
|
||||
} |
|
||||
|
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
/deep/ .el-form-item__error { |
|
||||
margin-left: 120px !important; |
|
||||
} |
|
||||
|
|
||||
.must { |
|
||||
color: #f00; |
|
||||
} |
|
||||
|
|
||||
.span-sty { |
|
||||
width: 90px !important; |
|
||||
} |
|
||||
|
|
||||
.addinputInfo { |
|
||||
margin-left: 80px !important; |
|
||||
} |
|
||||
|
|
||||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|
||||
margin-left: 80px !important; |
|
||||
width: calc(100% - 75px); |
|
||||
} |
|
||||
|
|
||||
.first_row { |
|
||||
border-top: 1px solid #E0E3EB; |
|
||||
} |
|
||||
|
|
||||
.titleOne { |
|
||||
padding: 7px; |
|
||||
display: flex; |
|
||||
flex-direction: row; |
|
||||
justify-content: space-between; |
|
||||
align-items: center; |
|
||||
} |
|
||||
|
|
||||
.el-menu-item.is-active { |
|
||||
background-color: #3370ff !important; |
|
||||
color: #fff; |
|
||||
|
|
||||
span { |
|
||||
color: #fff; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.el-submenu__title.is-active { |
|
||||
background: #1c88cf !important; |
|
||||
color: #fff !important; |
|
||||
} |
|
||||
</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> |
|
File diff suppressed because it is too large
@ -1,998 +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.externalOrderNumber" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="承运商"> |
|
||||
<el-select v-model="queryParams.params.carrier" placeholder="请选择" style="width: 200px;"> |
|
||||
<el-option v-for="(item,i) in carrierList" :key="i" :label="item.dictValue" :value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="运单号"> |
|
||||
<el-input v-model="queryParams.params.waybillNumber" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="买家"> |
|
||||
<el-input v-model="queryParams.params.buyer" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="手机号"> |
|
||||
<el-input v-model="queryParams.params.mobile" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="详细地址"> |
|
||||
<el-input v-model="queryParams.params.address" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="出库类型"> |
|
||||
<el-select v-model="queryParams.params.outboundType" placeholder="请选择" style="width: 200px;"> |
|
||||
<el-option v-for="(item,i) in outboundTypeList" :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.orderTimeStart" 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.orderTimeEnd" 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> |
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
|
||||
</div> |
|
||||
<!-- End 项目列表头部 --> |
|
||||
<!-- Start 项目列表 --> |
|
||||
<div class=""> |
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
|
||||
@selection-change="selectionLineChangeHandle" @row-click="rowItemClick"> |
|
||||
<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="externalState" width="100" label="外部状态" align="center" /> |
|
||||
<el-table-column prop="billNo" width="150" label="订单号" align="center" /> |
|
||||
<el-table-column prop="externalOrderNumber" width="150" label="外部单号" align="center" /> |
|
||||
<el-table-column prop="onlineOrderNumber" width="150" label="线上订单号" align="center" /> |
|
||||
<el-table-column prop="paymentTime" width="160" label="付款时间" align="center" /> |
|
||||
<el-table-column prop="outboundType" width="120" label="出库类型" align="center" /> |
|
||||
<el-table-column prop="inventoryStatusValue" width="120" label="库存状态" align="center" /> |
|
||||
<el-table-column prop="shipper" width="100" label="货主" align="center" /> |
|
||||
<el-table-column label="承运商" align="center" width="150"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-select v-model="scope.row.carrierValue" placeholder="请选择" @change="selectCarrier(scope.row,$event)"> |
|
||||
<el-option v-for="(item,i) in carrierList" :key="i" :label="item.dictValue" :value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="运单号" align="center" min-width="200"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-input ref="" v-model="scope.row.waybillNumber" clearable placeholder="" |
|
||||
@change="itemWaybillNumber(scope.row)" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="deliveryMethod" width="100" label="配送方式" align="center" /> |
|
||||
<el-table-column prop="buyer" width="100" label="买家" align="center" /> |
|
||||
<el-table-column prop="consignee" width="100" label="收货人" align="center" /> |
|
||||
<el-table-column prop="address" width="250" label="详细地址" align="center" /> |
|
||||
<el-table-column prop="mobile" width="120" label="手机号" align="center" /> |
|
||||
<el-table-column prop="actualPayment" width="80" label="实付" align="center" /> |
|
||||
<el-table-column prop="discount" width="80" label="优惠" align="center" /> |
|
||||
<el-table-column prop="freight" min-width="80" label="运费" align="center" /> |
|
||||
<el-table-column prop="weight" width="80" label="重量" align="center" /> |
|
||||
<el-table-column prop="weightEstimation" width="80" label="估重" align="center" /> |
|
||||
<el-table-column prop="volume" width="80" label="体积" align="center" /> |
|
||||
<el-table-column prop="quantity" width="100" label="商品总数" align="center" /> |
|
||||
<el-table-column prop="orderTime" width="160" label="下单时间" align="center" /> |
|
||||
<el-table-column prop="deliveryTime" width="160" label="到货时间" align="center" /> |
|
||||
<el-table-column prop="latestDeliveryTime" width="160" 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 class=""> |
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick"> |
|
||||
<el-tab-pane name="first"> |
|
||||
<span slot="label">订单明细(共: {{from.first .length}} 笔)</span> |
|
||||
<el-table :data="from.first " border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="goodsSpuName" label="商品名称" width="120" align="center" /> |
|
||||
<el-table-column prop="goodsSkuCode" label="商品编码" width="120" align="center" /> |
|
||||
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" /> |
|
||||
<el-table-column prop="barCode" label="商品条码" width="120" align="center" /> |
|
||||
<el-table-column prop="unit" label="单位" align="center" /> |
|
||||
<el-table-column prop="price" label="单价" align="center" /> |
|
||||
<el-table-column prop="orderCount" label="数量" align="center" /> |
|
||||
<el-table-column prop="actualPrice" label="应收" align="center" /> |
|
||||
<el-table-column prop="salesAmount" label="实际成交单价" width="160" align="center" /> |
|
||||
<el-table-column prop="salesAmount" label="销售金额" width="160" align="center" /> |
|
||||
<el-table-column prop="serialNumber" label="序列号" align="center" /> |
|
||||
<el-table-column label="库位" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<div style="color: #1890FF; text-decoration: underline ; cursor:pointer;" |
|
||||
@click="showStock(scope.row)"> |
|
||||
{{scope.row.reackState}} |
|
||||
</div> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="batchNumber" label="指定批次号" width="160" align="center" /> |
|
||||
<el-table-column prop="dateOfManufacture" label="指定生产日期" width="160" align="center" /> |
|
||||
<el-table-column prop="expirationDate" label="指定过期日期" width="160" align="center" /> |
|
||||
<el-table-column prop="batchExpansion" label="指定批次扩展属性" width="160" align="center" /> |
|
||||
<el-table-column prop="remarks" label="明细备注" width="120" align="center" /> |
|
||||
</el-table> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="two" label="库位分配"> |
|
||||
<el-table :data="from.two" border style="width: 100%"> |
|
||||
<el-table-column width="60" 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="spec" label="规格" align="center" /> |
|
||||
<el-table-column prop="rackCode" label="库位编码" align="center" /> |
|
||||
<el-table-column prop="count" label="分配数量" align="center" /> |
|
||||
</el-table> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="three" label="收件地址"> |
|
||||
<el-form ref="consignee" :model="from.three" class="formaddcopy02"> |
|
||||
<el-row style="border-top: 1px solid #E0E3EB"> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">收货人</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ from.three.consignee }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">固话</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ from.three.fixedLine }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">手机号</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ from.three.mobile }}</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">{{ from.three.province }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">市</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ from.three.city }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">县</div> |
|
||||
<el-form-item> <span class="addinputInfo">{{ from.three.county }}</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">{{ from.three.address }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="four" label="发票信息"> |
|
||||
|
|
||||
<div style="display: flex;flex-direction: row;"> |
|
||||
|
|
||||
<div style="flex: 1;"> |
|
||||
<el-form ref="consignee" :model="from.four" class="formaddcopy02" style="margin-top: -10px;"> |
|
||||
<el-row style="border-top: 1px solid #E0E3EB"> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">发票类型</div> |
|
||||
<el-select v-model="from.four.invoiceTypeValue" placeholder="请选择" class="addinputInfo addinputw" |
|
||||
@change="selectInvoiceTypeChange"> |
|
||||
<el-option v-for="(item,i) in billingTypeList" :key="item.dictKey" :label="item.dictValue" |
|
||||
:value="item.dictKey"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">开票方</div> |
|
||||
<el-form-item> <el-input v-model="from.four.invoicingParty" placeholder="" clearable |
|
||||
class="addinputInfo addinputw" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">抬头</div> |
|
||||
|
|
||||
<el-form-item> <el-input v-model="from.four.rise" placeholder="" clearable |
|
||||
class="addinputInfo addinputw" /></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="totalQuantity" :readonly="true" placeholder="" clearable |
|
||||
class="addinputInfo addinputw" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">税号</div> |
|
||||
<el-form-item> <el-input v-model="from.four.dutyParagraph" placeholder="" clearable |
|
||||
class="addinputInfo addinputw" /></el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="8"> |
|
||||
<div class="span-sty">发票备注</div> |
|
||||
<el-form-item> <el-input v-model="from.four.remarks" placeholder="" clearable |
|
||||
class="addinputInfo addinputw" /></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="24"> |
|
||||
<div class="span-sty">内容类型</div> |
|
||||
<el-form-item> <el-radio-group v-model="from.four.contentType" size="small" |
|
||||
class="addinputInfo addinputw"> |
|
||||
<el-radio :label="'1'">发票商品</el-radio> |
|
||||
<el-radio :label="'2'">自定义明细</el-radio> |
|
||||
</el-radio-group></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<div style="text-align: center;margin-top: 5px"> |
|
||||
<el-button type="primary" size="small" @click="saveInvoice">保存</el-button> |
|
||||
</div> |
|
||||
</el-form> |
|
||||
|
|
||||
</div> |
|
||||
<div style="flex: 1;" v-show="from.four.contentType=='2'"> |
|
||||
<div style="margin-bottom: 5px"> |
|
||||
<el-button type="primary" size="small" @click="chooseGoods">选择商品</el-button> |
|
||||
</div> |
|
||||
<el-table :data="from.four.detailsList" border style="width: 100%"> |
|
||||
<el-table-column 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="delGoods(scope.$index)">删除</el-button> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column prop="goodsSpuName" label="商品名称" align="center" /> |
|
||||
<el-table-column prop="unit" label="商品单位" align="center" /> |
|
||||
<el-table-column prop="price" label="商品单价" align="center" /> |
|
||||
<el-table-column prop="orderCount" label="数量" align="center" /> |
|
||||
<el-table-column prop="salesAmount" label="金额" align="center" /> |
|
||||
</el-table> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="five" label="备注/留言"> |
|
||||
<div style="display: flex;flex-direction: row;justify-content: flex-start;"> |
|
||||
<div style="width: 300px;"> |
|
||||
<div><el-divider direction="vertical"></el-divider><span style="font-weight: bold;">买家留言</span></div> |
|
||||
<div style="background-color: #f5f6f7;margin-top: 10px;min-height: 200px"> |
|
||||
<div style="margin-left: 15px"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div style="width: 300px;margin-left: 5px"> |
|
||||
<div><el-divider direction="vertical"></el-divider><span style="font-weight: bold;">线上备注</span></div> |
|
||||
<div style="background-color: #f5f6f7;margin-top: 10px;min-height: 200px"> |
|
||||
<div style="margin-left: 10px"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div style="width: 300px;margin-left: 5px"> |
|
||||
<div><el-divider direction="vertical"></el-divider><span style="font-weight: bold;">系统备注</span></div> |
|
||||
<div style="background-color: #f5f6f7;margin-top: 10px;min-height: 200px"> |
|
||||
<div style="margin-left: 10px"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</el-tab-pane> |
|
||||
<el-tab-pane name="six" label="操作记录"> |
|
||||
<el-table :data="from.six" border style="width: 100%"> |
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="createTime" label="操作时间" width="250" align="center" /> |
|
||||
<el-table-column prop="userName" label="操作账号" width="180" align="center" /> |
|
||||
<el-table-column prop="content" label="操作内容" align="center" /> |
|
||||
</el-table> |
|
||||
</el-tab-pane> |
|
||||
|
|
||||
</el-tabs> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<el-dialog title="选择商品" :visible.sync="dialogVisible" :before-close="handleClose" style="width:100%;"> |
|
||||
|
|
||||
<el-table :data="from.first" border style="width: 100%;margin-top: -20px" |
|
||||
@selection-change="handleSelectionChange" ref="main"> |
|
||||
<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="goodsSpuName" label="商品名称" align="center" /> |
|
||||
<el-table-column prop="unit" label="商品单位" align="center" /> |
|
||||
<el-table-column prop="price" label="商品单价" align="center" /> |
|
||||
<el-table-column prop="orderCount" label="数量" align="center" /> |
|
||||
<el-table-column prop="salesAmount" label="金额" align="center" /> |
|
||||
</el-table> |
|
||||
|
|
||||
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;"> |
|
||||
<el-button type="primary" style="margin-top: 20px;" @click="saveData">确 定</el-button> |
|
||||
</div> |
|
||||
|
|
||||
</el-dialog> |
|
||||
|
|
||||
<el-dialog title="库位分配选择" :visible.sync="dialogVisible2" :before-close="handleClose2" style="width:100%;"> |
|
||||
|
|
||||
<el-table :data="goodsStockList" border style="width: 100%;margin-top: -20px;" ref="main"> |
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|
||||
<el-table-column prop="warehouseName" label="仓库" align="center" /> |
|
||||
<el-table-column prop="areaName" label="库区" align="center" /> |
|
||||
<el-table-column prop="rackName" label="库位" align="center" /> |
|
||||
<el-table-column prop="rackCode" label="库位编码" align="center" /> |
|
||||
<el-table-column prop="useCount" label="可用库存" align="center" /> |
|
||||
<el-table-column label="分配数量" align="center" min-width="200"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-input v-model="scope.row.count" clearable placeholder="" |
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
|
|
||||
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;"> |
|
||||
<el-button type="primary" style="margin-top: 20px;" @click="saveData2">确 定</el-button> |
|
||||
</div> |
|
||||
|
|
||||
</el-dialog> |
|
||||
|
|
||||
|
|
||||
|
|
||||
</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 './inStorageAdd.vue' |
|
||||
// import divInfo from './inStorageInfo.vue' |
|
||||
import { |
|
||||
// getTypeValueList, |
|
||||
typeValues, |
|
||||
} from '@/api/Common/dictcommons' |
|
||||
export default { |
|
||||
components: { |
|
||||
ButtonBar, |
|
||||
Pagination, |
|
||||
pageye, |
|
||||
// divAdd, |
|
||||
// divInfo, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
activeName: "first", |
|
||||
activeIndex: "first", |
|
||||
dialogVisible: false, |
|
||||
dialogVisible2: false, |
|
||||
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: 'success', |
|
||||
// size: 'small', |
|
||||
// icon: 'export', |
|
||||
// btnKey: 'toPrintBill', |
|
||||
// btnLabel: '改承运商' |
|
||||
// }, |
|
||||
// { |
|
||||
// type: 'success', |
|
||||
// size: 'small', |
|
||||
// icon: 'export', |
|
||||
// btnKey: 'toBuild', |
|
||||
// btnLabel: '生产电子面单' |
|
||||
// }, |
|
||||
{ |
|
||||
type: 'info', |
|
||||
size: 'small', |
|
||||
icon: 'cross', |
|
||||
btnKey: 'doClose', |
|
||||
btnLabel: '关闭' |
|
||||
} |
|
||||
], |
|
||||
queryParams: { |
|
||||
current: 1, |
|
||||
size: 10, |
|
||||
total: 0, |
|
||||
params: { |
|
||||
"billNo": "", |
|
||||
"externalOrderNumber": "", |
|
||||
"onlineOrderNumber": "", |
|
||||
"buyer": "", |
|
||||
"waybillNumber": "", |
|
||||
"platform": "", |
|
||||
"carrier": "", |
|
||||
"mobile": "", |
|
||||
"outboundType": "", |
|
||||
"address": "", |
|
||||
"orderTimeStart": "", |
|
||||
"orderTimeEnd": "", |
|
||||
"menuUrl": "", |
|
||||
"orgPath": "", |
|
||||
"userSid": "", |
|
||||
"billState": "2", //0 待分配 1零拣打单 2待出库 3已出库 |
|
||||
} |
|
||||
}, |
|
||||
sids: [], |
|
||||
selectionList: [], |
|
||||
rowItemSid: "", |
|
||||
carrierList: [], |
|
||||
billingTypeList: [], |
|
||||
outboundTypeList: [{ |
|
||||
sid: "1", |
|
||||
name: "销售出库" |
|
||||
}], |
|
||||
from: { |
|
||||
first: [], |
|
||||
two: [], |
|
||||
three: {}, |
|
||||
four: { |
|
||||
detailsList: [] |
|
||||
}, |
|
||||
five: {}, |
|
||||
six: [] |
|
||||
}, |
|
||||
goodsList: [], |
|
||||
goodsStockList: [] |
|
||||
|
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.$refs['btnbar'].setButtonList(this.btnList) |
|
||||
}, |
|
||||
created() { |
|
||||
this.init() |
|
||||
this.loadList() |
|
||||
}, |
|
||||
computed: { |
|
||||
// 开票金额 |
|
||||
totalQuantity() { |
|
||||
let quantity = 0 |
|
||||
if (this.from.four.detailsList.length > 0) { |
|
||||
this.from.four.detailsList.forEach((e) => { |
|
||||
quantity += Number(e.salesAmount) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
this.from.four.totalAmount = quantity |
|
||||
|
|
||||
return quantity |
|
||||
}, |
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
init() { |
|
||||
|
|
||||
typeValues({ |
|
||||
type: 'billingType' |
|
||||
}).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.billingTypeList = res.data |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
typeValues({ |
|
||||
type: 'carrier' |
|
||||
}).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.carrierList = res.data |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
handleClick(table) { |
|
||||
console.log("handleClick", table.name); |
|
||||
|
|
||||
if (this.rowItemSid == '') { |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
showClose: true, |
|
||||
message: '暂无数据' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
|
|
||||
this.activeIndex = table.name |
|
||||
// 订单明细 |
|
||||
if (table.name == 'first') { |
|
||||
this.from.first = [] |
|
||||
req.orderGoodsDetail({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
this.from.first = resp.data |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
// 库位分配 |
|
||||
if (table.name == 'two') { |
|
||||
this.from.two = [] |
|
||||
req.orderRackDistributionDetail({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
this.from.two = resp.data |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
// 收件地址 |
|
||||
if (table.name == 'three') { |
|
||||
this.from.three = {} |
|
||||
req.orderReceivingAddressDetail({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
this.from.three = resp.data |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
// 发票信息 |
|
||||
if (table.name == 'four') { |
|
||||
this.from.four = { |
|
||||
detailsList: [] |
|
||||
} |
|
||||
req.orderInvoiveDetail({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
this.from.four = resp.data |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
// 备注/留言 |
|
||||
if (table.name == 'five') { |
|
||||
this.from.five = {} |
|
||||
req.orderRemarksDetail({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
this.from.five = resp.data |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
// 操作记录 |
|
||||
if (table.name == 'six') { |
|
||||
this.from.six = [] |
|
||||
req.orderOperationDetail({ |
|
||||
sid: this.rowItemSid |
|
||||
}).then((resp) => { |
|
||||
this.from.six = resp.data |
|
||||
}).catch(() => {}) |
|
||||
} |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
rowItemClick(row) { |
|
||||
console.log("row", row); |
|
||||
|
|
||||
if (row.sid == '') { |
|
||||
this.$message({ |
|
||||
type: 'warning', |
|
||||
showClose: true, |
|
||||
message: '暂无数据' |
|
||||
}) |
|
||||
return |
|
||||
} |
|
||||
this.rowItemSid = row.sid |
|
||||
var table = { |
|
||||
name: this.activeIndex |
|
||||
} |
|
||||
this.handleClick(table) |
|
||||
}, |
|
||||
|
|
||||
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 'toPrintBill': |
|
||||
this.toPrintBill() |
|
||||
break |
|
||||
case 'toPrintCode': |
|
||||
this.toPrintCode() |
|
||||
break |
|
||||
case 'toBuild': |
|
||||
this.toBuild() |
|
||||
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('orgSidPath') |
|
||||
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 |
|
||||
this.rowItemSid = '' |
|
||||
this.from = { |
|
||||
first: [], |
|
||||
two: [], |
|
||||
three: {}, |
|
||||
four: { |
|
||||
detailsList: [] |
|
||||
}, |
|
||||
five: {}, |
|
||||
six: [] |
|
||||
} |
|
||||
this.rowItemClick(this.dataList[0]) |
|
||||
|
|
||||
} 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: { |
|
||||
"billNo": "", |
|
||||
"externalOrderNumber": "", |
|
||||
"onlineOrderNumber": "", |
|
||||
"buyer": "", |
|
||||
"waybillNumber": "", |
|
||||
"platform": "", |
|
||||
"carrier": "", |
|
||||
"mobile": "", |
|
||||
"outboundType": "", |
|
||||
"address": "", |
|
||||
"orderTimeStart": "", |
|
||||
"orderTimeEnd": "", |
|
||||
"menuUrl": "", |
|
||||
"orgPath": "", |
|
||||
"userSid": "", |
|
||||
"billState": "2", //0 待分配 1零拣打单 2待出库 3已出库 |
|
||||
} |
|
||||
} |
|
||||
this.loadList() |
|
||||
}, |
|
||||
toAdd() { |
|
||||
|
|
||||
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)' |
|
||||
}) |
|
||||
|
|
||||
var params = { |
|
||||
billState: "3", // 下一步骤的单据状态0 待分配 1 零拣 2待出库 3已出库 |
|
||||
userSid: window.sessionStorage.getItem('userSid'), |
|
||||
sid: this.sids.join(",") |
|
||||
} |
|
||||
|
|
||||
req.confirmOutbound(params).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({ |
|
||||
type: 'warning', |
|
||||
showClose: true, |
|
||||
message: '请至少选择一条记录进行操作' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
}, |
|
||||
toPrintBill() { |
|
||||
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]) |
|
||||
}, |
|
||||
toPrintCode(row) { |
|
||||
this.viewState = 3 |
|
||||
this.$refs['divadd'].showEdit(row) |
|
||||
|
|
||||
}, |
|
||||
toBuild(row) { |
|
||||
this.viewState = 4 |
|
||||
this.$refs['divinfo'].showEdit(row) |
|
||||
}, |
|
||||
doClose() { |
|
||||
this.$store.dispatch('tagsView/delView', this.$route) |
|
||||
this.$router.go(-1) |
|
||||
}, |
|
||||
toRelevancy(row) { |
|
||||
this.viewState = 4 |
|
||||
this.$refs['divinfo'].showAdd(row) |
|
||||
}, |
|
||||
resetState() { |
|
||||
this.viewState = 1 |
|
||||
}, |
|
||||
selectInvoiceTypeChange(val) { |
|
||||
|
|
||||
const choose = this.billingTypeList.filter((item) => item.dictKey == val) |
|
||||
console.log('>>>>>>>>>selectInvoiceTypeChange', choose) |
|
||||
this.from.four.invoiceType = choose[0].dictKey |
|
||||
this.from.four.invoiceTypeValue = choose[0].dictValue |
|
||||
}, |
|
||||
saveInvoice() { |
|
||||
req.saveOrderInvoive(this.from.four).then((resp) => { |
|
||||
if (res.success) { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '保存成功', |
|
||||
showClose: true |
|
||||
}) |
|
||||
} |
|
||||
}).catch(() => {}) |
|
||||
}, |
|
||||
chooseGoods() { |
|
||||
this.goodsList = [] |
|
||||
this.dialogVisible = true |
|
||||
|
|
||||
}, |
|
||||
handleClose() { |
|
||||
this.dialogVisible = false |
|
||||
}, |
|
||||
handleSelectionChange(val) { |
|
||||
console.log("val", val); |
|
||||
this.goodsList = val |
|
||||
}, |
|
||||
saveData() { |
|
||||
this.from.four.detailsList = this.goodsList |
|
||||
this.dialogVisible = false |
|
||||
}, |
|
||||
delGoods(index) { |
|
||||
this.from.four.detailsList.splice(index, 1) |
|
||||
}, |
|
||||
selectCarrier(row, val) { |
|
||||
console.log("selectCarrier", val); |
|
||||
|
|
||||
const choose = this.carrierList.filter((item) => item.dictKey == val) |
|
||||
console.log('>>>>>>>>>selectCarrier', choose) |
|
||||
row.carrierValue = choose[0].dictValue |
|
||||
row.carrierKey = choose[0].dictKey |
|
||||
|
|
||||
var query = { |
|
||||
sid: row.sid, |
|
||||
carrierValue: row.carrierValue, |
|
||||
carrierKey: row.carrierKey, |
|
||||
userSid: window.sessionStorage.getItem('userSid') |
|
||||
} |
|
||||
req.updateCarrier(query).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '保存成功', |
|
||||
showClose: true |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
itemWaybillNumber(row) { |
|
||||
console.log("itemWaybillNumber", row); |
|
||||
|
|
||||
var query = { |
|
||||
sid: row.sid, |
|
||||
waybillNumber: row.waybillNumber, |
|
||||
userSid: window.sessionStorage.getItem('userSid') |
|
||||
} |
|
||||
req.updateWaybillNumber(query).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.$message({ |
|
||||
type: 'success', |
|
||||
message: '保存成功', |
|
||||
showClose: true |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
}, |
|
||||
showStock(row) { |
|
||||
console.log("showStock", row); |
|
||||
|
|
||||
req.selAvailableBySkuSid({ |
|
||||
skuSid: row.goodsSkuSid, |
|
||||
sourceBillSid: this.rowItemSid, |
|
||||
orgSid: window.sessionStorage.getItem('orgSid') |
|
||||
}).then((res) => { |
|
||||
console.log("selAvailableBySkuSid", res); |
|
||||
|
|
||||
if (res.success) { |
|
||||
this.goodsStockList = res.data |
|
||||
this.dialogVisible2 = true |
|
||||
|
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
}, |
|
||||
handleClose2() { |
|
||||
this.dialogVisible2 = false |
|
||||
}, |
|
||||
saveData2() { |
|
||||
console.log("saveData2", this.goodsStockList); |
|
||||
var goodsStocks = [] |
|
||||
|
|
||||
for (var i = 0; i < this.goodsStockList.length; i++) { |
|
||||
|
|
||||
var item = this.goodsStockList[i] |
|
||||
|
|
||||
if (Number(item.count) > 0) { |
|
||||
|
|
||||
goodsStocks.push({ |
|
||||
"sid": item.locationSid, |
|
||||
"sourceBillSid": this.rowItemSid, |
|
||||
"goodsSkuSid": item.goodsSkuSid, |
|
||||
"goodsSpuName": item.goodsSpuName, |
|
||||
"goodsSpuTitle": "", |
|
||||
"goodsSkuCode": '', |
|
||||
"count": item.count, |
|
||||
"rackSid": item.rackSid, |
|
||||
"rackCode": item.rackCode, |
|
||||
"inventorySid": item.inventorySid, |
|
||||
"initialCount": item.initialCount, |
|
||||
"locationSid": item.locationSid, |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
req.saveSelAvailable(goodsStocks).then((res) => { |
|
||||
console.log("saveSelAvailable", res); |
|
||||
|
|
||||
if (res.success) { |
|
||||
this.dialogVisible2 = false |
|
||||
this.loadList() |
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
|
|
||||
} |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
/deep/ .el-form-item__error { |
|
||||
margin-left: 120px !important; |
|
||||
} |
|
||||
|
|
||||
.must { |
|
||||
color: #f00; |
|
||||
} |
|
||||
|
|
||||
.span-sty { |
|
||||
width: 90px !important; |
|
||||
} |
|
||||
|
|
||||
.addinputInfo { |
|
||||
margin-left: 80px !important; |
|
||||
} |
|
||||
|
|
||||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|
||||
margin-left: 80px !important; |
|
||||
width: calc(100% - 75px); |
|
||||
} |
|
||||
|
|
||||
.first_row { |
|
||||
border-top: 1px solid #E0E3EB; |
|
||||
} |
|
||||
|
|
||||
.titleOne { |
|
||||
padding: 7px; |
|
||||
display: flex; |
|
||||
flex-direction: row; |
|
||||
justify-content: space-between; |
|
||||
align-items: center; |
|
||||
} |
|
||||
|
|
||||
.el-menu-item.is-active { |
|
||||
background-color: #3370ff !important; |
|
||||
color: #fff; |
|
||||
|
|
||||
span { |
|
||||
color: #fff; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.el-submenu__title.is-active { |
|
||||
background: #1c88cf !important; |
|
||||
color: #fff !important; |
|
||||
} |
|
||||
</style> |
|
File diff suppressed because it is too large
@ -1,439 +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, |
|
||||
getWarehouses, |
|
||||
getWarehouseareas |
|
||||
} 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'), |
|
||||
} |
|
||||
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(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,353 +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="listQuery.params.createDateStart" @change="selectTime1" type="date" |
|
||||
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
|
||||
</el-date-picker> 至 |
|
||||
<el-date-picker v-model="listQuery.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-item label="单据编号"> |
|
||||
<el-input v-model="listQuery.params.spec" placeholder="" clearable /> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="商品"> |
|
||||
<el-select v-model="listQuery.params.goodsSpuSid" placeholder="请选择" style="width: 200px;"> |
|
||||
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" :value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="调整类型"> |
|
||||
<el-select v-model="listQuery.params.typeSid" placeholder="请选择" style="width: 200px;"> |
|
||||
<el-option v-for="(item,i) in typeList" :key="i" :label="item.name" :value="item.sid"> |
|
||||
</el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="操作员"> |
|
||||
<el-input v-model="listQuery.params.spec" 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 prop="createTime" label="操作日期" align="center" /> |
|
||||
<el-table-column prop="type" label="调整类型" align="center" /> |
|
||||
<el-table-column prop="billNo" label="单据编号" align="center" /> |
|
||||
<el-table-column prop="warehouseName" label="仓库" align="center" /> |
|
||||
<el-table-column prop="operator" 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="listQuery.total" :page.sync="listQuery.current" |
|
||||
:limit.sync="listQuery.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/inventoryAdjust/inventoryAdjust.js' |
|
||||
import req2 from '@/api/goods/goods.js' |
|
||||
import ButtonBar from '@/components/ButtonBar' |
|
||||
import Pagination from '@/components/pagination' |
|
||||
import pageye from '@/components/pagination/pageye' |
|
||||
import divAdd from './inventoryAdjustAdd.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: 'del', |
|
||||
btnKey: 'doDel', |
|
||||
btnLabel: '删除' |
|
||||
}, { |
|
||||
type: 'info', |
|
||||
size: 'small', |
|
||||
icon: 'cross', |
|
||||
btnKey: 'doClose', |
|
||||
btnLabel: '关闭' |
|
||||
} |
|
||||
], |
|
||||
listQuery: { |
|
||||
current: 1, |
|
||||
size: 10, |
|
||||
total: 0, |
|
||||
params: { |
|
||||
"createDateStart": "", |
|
||||
"createDateEnd": "", |
|
||||
} |
|
||||
}, |
|
||||
sids: [], |
|
||||
selectionList: [], |
|
||||
goodsList: [], |
|
||||
typeList: [{ |
|
||||
sid: "1", |
|
||||
name: "数量调整" |
|
||||
}], |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
this.$refs['btnbar'].setButtonList(this.btnList) |
|
||||
}, |
|
||||
created() { |
|
||||
this.loadList() |
|
||||
this.init() |
|
||||
}, |
|
||||
methods: { |
|
||||
init() { |
|
||||
var query = { |
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath') |
|
||||
} |
|
||||
req2.getGoodsListAllByOrg(query).then((res) => { |
|
||||
this.goodsList = res.data |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 搜索条件效果 |
|
||||
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.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|
||||
this.listQuery.params.orgPath = window.sessionStorage.getItem('orgSidPath') |
|
||||
this.listQuery.params.menuUrl = this.$route.path |
|
||||
req.listPage(this.listQuery).then((resp) => { |
|
||||
this.tableLoading = false |
|
||||
if (resp.success) { |
|
||||
const data = resp.data |
|
||||
this.listQuery.total = data.total |
|
||||
this.dataList = data.records |
|
||||
} else { |
|
||||
// 根据resp.code进行异常情况处理 |
|
||||
this.dataList = [] |
|
||||
this.listQuery.total = 0 |
|
||||
} |
|
||||
}).catch(() => { |
|
||||
this.tableLoading = false |
|
||||
}) |
|
||||
}, |
|
||||
|
|
||||
// 序号 |
|
||||
indexMethod(index) { |
|
||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|
||||
var pageindex = index + 1 + pagestart |
|
||||
return pageindex |
|
||||
}, |
|
||||
selectTime1() { |
|
||||
|
|
||||
}, |
|
||||
selectTime2() { |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
dosearch() { |
|
||||
this.listQuery.current = 1 |
|
||||
this.loadList() |
|
||||
}, |
|
||||
resetQuery() { |
|
||||
this.listQuery = { |
|
||||
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.listQuery.params).then((resp) => { |
|
||||
loading.close() |
|
||||
const blob = new Blob([resp], { |
|
||||
type: 'application/vnd.ms-excel' |
|
||||
}) |
|
||||
const fileName = '出入库明细_' + this.listQuery.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) |
|
||||
}, |
|
||||
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 |
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
</style> |
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue