|
|
|
|
@ -10,7 +10,10 @@ |
|
|
|
|
@closed="closed" |
|
|
|
|
> |
|
|
|
|
<div class="search-box"> |
|
|
|
|
<el-form :inline="true" :model="query"> |
|
|
|
|
<el-form |
|
|
|
|
:inline="true" |
|
|
|
|
:model="query" |
|
|
|
|
> |
|
|
|
|
<el-form-item label="商品信息"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="query.keyword" |
|
|
|
|
@ -33,7 +36,10 @@ |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<rrOpt @query="toQuery" @reset="toReset" /> |
|
|
|
|
<rrOpt |
|
|
|
|
@query="toQuery" |
|
|
|
|
@reset="toReset" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
@ -56,214 +62,213 @@ |
|
|
|
|
:disabled="!handleSelectId.length != 0" |
|
|
|
|
@click="onSave" |
|
|
|
|
:loading="btnLoading" |
|
|
|
|
>确定</el-button |
|
|
|
|
> |
|
|
|
|
>确定</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { queryGoodsAndLocation } from "@/api/libraryManage/common.js"; |
|
|
|
|
import { getTableHeader } from "@/api/system/table"; |
|
|
|
|
import { queryGoodsAndLocation } from '@/api/libraryManage/common.js' |
|
|
|
|
import { getTableHeader } from '@/api/system/table' |
|
|
|
|
export default { |
|
|
|
|
dicts: ["goods_unit", "goods_classify"], |
|
|
|
|
props: ["queryParams"], |
|
|
|
|
dicts: ['goods_unit', 'goods_classify'], |
|
|
|
|
props: ['queryParams'], |
|
|
|
|
data() { |
|
|
|
|
const _that = this; |
|
|
|
|
const _that = this |
|
|
|
|
return { |
|
|
|
|
btnLoading: false, |
|
|
|
|
dialogVisible: false, |
|
|
|
|
query: { |
|
|
|
|
goodsMnemonic: "", |
|
|
|
|
goodsMnemonic: '' |
|
|
|
|
}, |
|
|
|
|
loading: false, |
|
|
|
|
handleSelectId: [], |
|
|
|
|
handleSelect: [], |
|
|
|
|
handleSelectMap: [], |
|
|
|
|
tableProps: { |
|
|
|
|
"row-key": "stockId", |
|
|
|
|
"max-height": 460, |
|
|
|
|
'row-key': 'stockId', |
|
|
|
|
'max-height': 460 |
|
|
|
|
}, |
|
|
|
|
tableConfig: { |
|
|
|
|
config: [ |
|
|
|
|
{ |
|
|
|
|
label: "复选框", |
|
|
|
|
type: "selection", |
|
|
|
|
prop: "selection", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '复选框', |
|
|
|
|
type: 'selection', |
|
|
|
|
prop: 'selection', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
label: "业主编号", |
|
|
|
|
prop: "consignorCode", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '业主编号', |
|
|
|
|
prop: 'consignorCode', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "业主名称", |
|
|
|
|
prop: "consignorName", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '业主名称', |
|
|
|
|
prop: 'consignorName', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "商品编号", |
|
|
|
|
prop: "goodNo", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '商品编号', |
|
|
|
|
prop: 'goodNo', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "商品名称", |
|
|
|
|
prop: "goodName", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '商品名称', |
|
|
|
|
prop: 'goodName', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "单位", |
|
|
|
|
prop: "unit", |
|
|
|
|
label: '单位', |
|
|
|
|
prop: 'unit', |
|
|
|
|
istrue: true, |
|
|
|
|
filter(row, value) { |
|
|
|
|
return _that.getDictLabel(value, _that.dict.type.goods_unit); |
|
|
|
|
}, |
|
|
|
|
return _that.getDictLabel(value, _that.dict.type.goods_unit) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "商品规格", |
|
|
|
|
prop: "specifications", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '商品规格', |
|
|
|
|
prop: 'specifications', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "件装量", |
|
|
|
|
prop: "packageQty", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '件装量', |
|
|
|
|
prop: 'packageQty', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "厂家", |
|
|
|
|
prop: "factory", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '厂家', |
|
|
|
|
prop: 'factory', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "产品分类", |
|
|
|
|
prop: "classify", |
|
|
|
|
label: '产品分类', |
|
|
|
|
prop: 'classify', |
|
|
|
|
istrue: true, |
|
|
|
|
filter(row, value) { |
|
|
|
|
return _that.getDictLabel(value, _that.dict.type.goods_classify); |
|
|
|
|
}, |
|
|
|
|
return _that.getDictLabel(value, _that.dict.type.goods_classify) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "存储分类", |
|
|
|
|
prop: "storageClassify", |
|
|
|
|
label: '存储分类', |
|
|
|
|
prop: 'storageClassify', |
|
|
|
|
istrue: true, |
|
|
|
|
filter(row, value) { |
|
|
|
|
return value === "1" ? "整散合一" : "整散分开"; |
|
|
|
|
}, |
|
|
|
|
return value === '1' ? '整散合一' : '整散分开' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "库存数量", |
|
|
|
|
prop: "qty", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '库存数量', |
|
|
|
|
prop: 'qty', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "批号", |
|
|
|
|
prop: "batchNo", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '批号', |
|
|
|
|
prop: 'batchNo', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "生产日期", |
|
|
|
|
prop: "productionDate", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '生产日期', |
|
|
|
|
prop: 'productionDate', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "有效期", |
|
|
|
|
prop: "expiredDate", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '有效期', |
|
|
|
|
prop: 'expiredDate', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "显示货位", |
|
|
|
|
prop: "locationName", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '显示货位', |
|
|
|
|
prop: 'locationName', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "库别", |
|
|
|
|
prop: "storageName", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '库别', |
|
|
|
|
prop: 'storageName', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "件数", |
|
|
|
|
prop: "caseQty", |
|
|
|
|
istrue: true, |
|
|
|
|
label: '件数', |
|
|
|
|
prop: 'caseQty', |
|
|
|
|
istrue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "零散数", |
|
|
|
|
prop: "pieceQty", |
|
|
|
|
istrue: true, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
label: '零散数', |
|
|
|
|
prop: 'pieceQty', |
|
|
|
|
istrue: true |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
tableData: [], |
|
|
|
|
paging: { |
|
|
|
|
page: 1, // 当前页 |
|
|
|
|
size: 10, // 页面大小 |
|
|
|
|
total: 0, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
total: 0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
async open() { |
|
|
|
|
await this.getTableHeaderCom("busin_lock_goods", { |
|
|
|
|
config: this.tableConfig.config, |
|
|
|
|
}); |
|
|
|
|
this.toReset(); |
|
|
|
|
await this.getTableHeaderCom('busin_lock_goods', { |
|
|
|
|
config: this.tableConfig.config |
|
|
|
|
}) |
|
|
|
|
this.toReset() |
|
|
|
|
}, |
|
|
|
|
closed() { |
|
|
|
|
this.btnLoading = false; |
|
|
|
|
this.btnLoading = false |
|
|
|
|
}, |
|
|
|
|
// 取消 |
|
|
|
|
closeDialog() { |
|
|
|
|
this.dialogVisible = false; |
|
|
|
|
this.dialogVisible = false |
|
|
|
|
}, |
|
|
|
|
// 保存 |
|
|
|
|
onSave() { |
|
|
|
|
if (this.handleSelectId.length === 0) { |
|
|
|
|
this.$message.warning("请至少选择一行数据"); |
|
|
|
|
return; |
|
|
|
|
this.$message.warning('请至少选择一行数据') |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.btnLoading = true; |
|
|
|
|
this.$emit("getGoodsInfo", this.handleSelect); |
|
|
|
|
this.closeDialog(); |
|
|
|
|
this.btnLoading = true |
|
|
|
|
this.$emit('getGoodsInfo', this.handleSelect) |
|
|
|
|
this.closeDialog() |
|
|
|
|
}, |
|
|
|
|
// 搜索 |
|
|
|
|
toQuery() { |
|
|
|
|
this.paging.page = 1; |
|
|
|
|
this.queryTable(); |
|
|
|
|
this.paging.page = 1 |
|
|
|
|
this.queryTable() |
|
|
|
|
}, |
|
|
|
|
// 重置 |
|
|
|
|
toReset() { |
|
|
|
|
this.query = {}; |
|
|
|
|
this.queryTable(); |
|
|
|
|
this.query = {} |
|
|
|
|
this.queryTable() |
|
|
|
|
}, |
|
|
|
|
//列表的请求 |
|
|
|
|
queryTable() { |
|
|
|
|
this.loading = true; |
|
|
|
|
this.loading = true |
|
|
|
|
let obj = { |
|
|
|
|
pageSize: this.paging.size, |
|
|
|
|
pageNum: this.paging.page, |
|
|
|
|
...this.query, |
|
|
|
|
...this.queryParams, |
|
|
|
|
}; |
|
|
|
|
...this.queryParams |
|
|
|
|
} |
|
|
|
|
queryGoodsAndLocation(obj) |
|
|
|
|
.then((res) => { |
|
|
|
|
if (res.code === 200) { |
|
|
|
|
this.tableData = res.rows; |
|
|
|
|
this.paging.total = res.total; |
|
|
|
|
this.tableData = res.rows |
|
|
|
|
this.paging.total = res.total |
|
|
|
|
} |
|
|
|
|
this.loading = false; |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 表格复选框选中 |
|
|
|
|
handleselection(val) { |
|
|
|
|
this.handleSelectId = val.map((ele) => ele.id); |
|
|
|
|
this.handleSelect = val; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
this.handleSelectId = val.map((ele) => ele.id) |
|
|
|
|
this.handleSelect = val |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped> |
|
|
|
|
.search-box { |
|
|
|
|
|