|
|
|
@ -5,7 +5,7 @@ |
|
|
|
<el-input |
|
|
|
<el-input |
|
|
|
v-model="temp.filter" |
|
|
|
v-model="temp.filter" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
placeholder="筛选分类" |
|
|
|
placeholder="筛选试剂" |
|
|
|
clearable |
|
|
|
clearable |
|
|
|
suffix-icon="el-icon-search" |
|
|
|
suffix-icon="el-icon-search" |
|
|
|
style="margin-bottom: 10px" |
|
|
|
style="margin-bottom: 10px" |
|
|
|
@ -14,17 +14,36 @@ |
|
|
|
<category-tree ref="tree" :filter-node-method="filterNode" @node-click="nodeClick"/> |
|
|
|
<category-tree ref="tree" :filter-node-method="filterNode" @node-click="nodeClick"/> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<search-form v-model="searchForm" @search="search" @reset="clearCidSearch"> |
|
|
|
<search-form v-model="searchForm" @search="search" @reset="clearNameSearch"> |
|
|
|
<el-form-item label="商品分类"> |
|
|
|
<el-form-item label="试 剂"> |
|
|
|
<el-input :value="temp.cname" maxlength="100" clearable @clear="clearCidSearch"/> |
|
|
|
<el-input :value="temp.name" maxlength="100" clearable @clear="clearNameSearch"/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="采购订单"> |
|
|
|
<el-form-item label="厂 商"> |
|
|
|
<el-input v-model="searchForm.cgddid" maxlength="100" clearable/> |
|
|
|
<el-select v-model="searchForm.manufacture" clearable @clear="searchForm.manufacture = null"> |
|
|
|
|
|
|
|
<el-option :value="searchForm.manufacture" /> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="采购入库单"> |
|
|
|
<!-- <el-form-item label="行政区域"> |
|
|
|
<el-input v-model="searchForm.cgrkid" maxlength="100" clearable/> |
|
|
|
<region-selector |
|
|
|
|
|
|
|
:value="temp.regionName" |
|
|
|
|
|
|
|
limit |
|
|
|
|
|
|
|
:limit-api="getLimitRegion" |
|
|
|
|
|
|
|
get-children-on-select |
|
|
|
|
|
|
|
@clear="clearSidSearch" |
|
|
|
|
|
|
|
@select="selectRegion" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-form-item>--> |
|
|
|
|
|
|
|
<el-form-item label="分 类"> |
|
|
|
|
|
|
|
<el-select v-model="searchForm.type" clearable @clear="searchForm.type = null"> |
|
|
|
|
|
|
|
<el-option :value="searchForm.type" /> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="危险说明"> |
|
|
|
|
|
|
|
<el-select v-model="searchForm.risk" clearable @clear="searchForm.risk = null"> |
|
|
|
|
|
|
|
<el-option :value="searchForm.risk" /> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="入库时间"> |
|
|
|
<!-- <el-form-item label="入库时间"> |
|
|
|
<el-date-picker |
|
|
|
<el-date-picker |
|
|
|
v-model="temp.ctime" |
|
|
|
v-model="temp.ctime" |
|
|
|
format="yyyy-MM-dd" |
|
|
|
format="yyyy-MM-dd" |
|
|
|
@ -32,7 +51,7 @@ |
|
|
|
type="daterange" |
|
|
|
type="daterange" |
|
|
|
value-format="timestamp" |
|
|
|
value-format="timestamp" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item>--> |
|
|
|
</search-form> |
|
|
|
</search-form> |
|
|
|
|
|
|
|
|
|
|
|
<el-row class="button-group"> |
|
|
|
<el-row class="button-group"> |
|
|
|
@ -47,18 +66,25 @@ |
|
|
|
:summary-method="summary" |
|
|
|
:summary-method="summary" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-table-column align="center" label="#" type="index" width="80"/> |
|
|
|
<el-table-column align="center" label="#" type="index" width="80"/> |
|
|
|
<el-table-column align="center" label="商品分类"> |
|
|
|
|
|
|
|
<a slot-scope="{row}" type="primary" @click="() => more(row)">{{ row.cname }}</a> |
|
|
|
<el-table-column align="center" label="试 剂"> |
|
|
|
|
|
|
|
<a slot-scope="{row}" type="primary" @click="() => more(row)">{{ row.name }}</a> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" label="库存数量" prop="totalNum" show-overflow-tooltip/> |
|
|
|
|
|
|
|
<el-table-column align="center" label="总 值" prop="totalPrice" show-overflow-tooltip/> |
|
|
|
<el-table-column align="center" label="货位" prop="location" show-overflow-tooltip/> |
|
|
|
|
|
|
|
<el-table-column align="center" label="仓库" prop="storehouse" show-overflow-tooltip/> |
|
|
|
|
|
|
|
<el-table-column align="center" label="库存数量" prop="quantity" show-overflow-tooltip/> |
|
|
|
|
|
|
|
<el-table-column align="center" label="单位" prop="unit" show-overflow-tooltip/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-table-column align="center" label="总 值" prop="totalPrice" show-overflow-tooltip/> --> |
|
|
|
|
|
|
|
|
|
|
|
</abstract-table> |
|
|
|
</abstract-table> |
|
|
|
|
|
|
|
|
|
|
|
<abstract-pagination :model="searchForm" @current-change="pageChange"/> |
|
|
|
<abstract-pagination :model="searchForm" @current-change="pageChange"/> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
</extra-area> |
|
|
|
</extra-area> |
|
|
|
|
|
|
|
|
|
|
|
<detail-dialog v-model="detailDialog" :title="title" :cid="cid"/> |
|
|
|
<detail-dialog v-model="detailDialog" :title="title" :name="name"/> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
@ -75,7 +101,7 @@ import {plus} from "@/util/math" |
|
|
|
import {getNodeId} from "@/util/tree" |
|
|
|
import {getNodeId} from "@/util/tree" |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "currentStock", |
|
|
|
name: "reagentStock", |
|
|
|
|
|
|
|
|
|
|
|
mixins: [tableMixin], |
|
|
|
mixins: [tableMixin], |
|
|
|
|
|
|
|
|
|
|
|
@ -84,50 +110,52 @@ export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
searchForm: { |
|
|
|
searchForm: { |
|
|
|
cids: null, |
|
|
|
names: null, |
|
|
|
cgddids: null, |
|
|
|
manufacture: null, |
|
|
|
cgrkids: null |
|
|
|
type: null, |
|
|
|
|
|
|
|
risk: null |
|
|
|
}, |
|
|
|
}, |
|
|
|
temp: { |
|
|
|
temp: { |
|
|
|
filter: '', |
|
|
|
filter: '', |
|
|
|
cname: null, |
|
|
|
names: null, |
|
|
|
cids: null, |
|
|
|
|
|
|
|
ctime: [] |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
detailDialog: false, |
|
|
|
detailDialog: false, |
|
|
|
|
|
|
|
//导出表格 |
|
|
|
excel: { |
|
|
|
excel: { |
|
|
|
columns: [ |
|
|
|
columns: [ |
|
|
|
{header: '序号', prop: 'id', width: 20, merge: true}, |
|
|
|
{header: '序号', prop: 'id', width: 20, merge: true}, |
|
|
|
{header: '分类名称', prop: 'cname', width: 20, merge: true}, |
|
|
|
{header: '试剂', prop: 'name', width: 20, merge: true}, |
|
|
|
|
|
|
|
{header: '货位', prop: 'location', width: 20, merge: true}, |
|
|
|
|
|
|
|
{header: '仓库', prop: 'storehouse', width: 20, merge: true}, |
|
|
|
{header: '库存总数', prop: 'totalNum', width: 20, merge: true}, |
|
|
|
{header: '库存总数', prop: 'totalNum', width: 20, merge: true}, |
|
|
|
{header: '库存总值', prop: 'totalPrice', width: 20, merge: true}, |
|
|
|
{header: '单位', prop: 'unit', width: 20, merge: true}, |
|
|
|
{header: '采购订单号', prop: 'cgddid', width: 20, merge: true}, |
|
|
|
|
|
|
|
{header: '采购单价', prop: 'cgPrice', width: 20, merge: true}, |
|
|
|
{header: '产品批次', prop: 'batch', width: 20, merge: true}, |
|
|
|
{header: '采购数量', prop: 'cgNum', width: 20, merge: true}, |
|
|
|
{header: '规格', prop: 'specification', width: 20, merge: true}, |
|
|
|
{header: '采购入库单号', prop: 'cgrkid', width: 20}, |
|
|
|
{header: '生产日期', prop: 'productionDate', width: 20, merge: true}, |
|
|
|
{header: '入库时间', prop: 'ctime', width: 20}, |
|
|
|
{header: '有效期(天)', prop: 'effective', width: 20, merge: true}, |
|
|
|
{header: '入库数量', prop: 'rkNum', width: 20}, |
|
|
|
|
|
|
|
], |
|
|
|
], |
|
|
|
merge: {primaryKey: 'cid', orderKey: 'id'} |
|
|
|
merge: {primaryKey: 'name', orderKey: 'id'} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
title() { |
|
|
|
title() { |
|
|
|
return this.row ? `库存详细(${this.row.cname})` : '' |
|
|
|
return this.row ? `库存详细(${this.row.name})` : '' |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
cid() { |
|
|
|
name() { |
|
|
|
return this.row ? this.row.cid : null |
|
|
|
return this.row ? this.row.name : null |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
summary({data}) { |
|
|
|
summary({data}) { |
|
|
|
let sum = ['合计', '', '', 0] |
|
|
|
let sum = ['合计', '', '', '', '', ''] |
|
|
|
data.forEach(i => { |
|
|
|
data.forEach(i => { |
|
|
|
sum[3] = plus(sum[3], i.totalPrice) |
|
|
|
sum[4] = plus(sum[4], i.totalNum) //将总值改为总数量 |
|
|
|
}) |
|
|
|
}) |
|
|
|
return sum |
|
|
|
return sum |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -141,19 +169,19 @@ export default { |
|
|
|
this.$refs.tree.filter(v) |
|
|
|
this.$refs.tree.filter(v) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
mergeSearchForm() { |
|
|
|
/*mergeSearchForm() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
...this.searchForm, |
|
|
|
...this.searchForm, |
|
|
|
startTime: this.temp.ctime ? this.temp.ctime[0] : null, |
|
|
|
//startTime: this.temp.ctime ? this.temp.ctime[0] : null, |
|
|
|
endTime: this.temp.ctime ? this.temp.ctime[1] + 86400000 : null |
|
|
|
//endTime: this.temp.ctime ? this.temp.ctime[1] + 86400000 : null |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
},*/ |
|
|
|
|
|
|
|
|
|
|
|
search() { |
|
|
|
search() { |
|
|
|
if (this.config.loading) return |
|
|
|
if (this.config.loading) return |
|
|
|
this.config.loading = true |
|
|
|
this.config.loading = true |
|
|
|
search |
|
|
|
search |
|
|
|
.request(this.mergeSearchForm()) |
|
|
|
.request(this.searchForm) |
|
|
|
.then(({data: {list, total}}) => { |
|
|
|
.then(({data: {list, total}}) => { |
|
|
|
this.searchForm.total = total |
|
|
|
this.searchForm.total = total |
|
|
|
this.tableData = list |
|
|
|
this.tableData = list |
|
|
|
@ -168,13 +196,13 @@ export default { |
|
|
|
nodeClick(obj) { |
|
|
|
nodeClick(obj) { |
|
|
|
const ids = getNodeId(obj.children) |
|
|
|
const ids = getNodeId(obj.children) |
|
|
|
ids.unshift(obj.id) |
|
|
|
ids.unshift(obj.id) |
|
|
|
this.searchForm.cids = ids.join(',') |
|
|
|
this.searchForm.names = ids.join(',') |
|
|
|
this.temp.cname = obj.name |
|
|
|
this.temp.name = obj.name |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
clearCidSearch() { |
|
|
|
clearNameSearch() { |
|
|
|
this.searchForm.cids = null |
|
|
|
this.searchForm.names = null |
|
|
|
this.temp.cname = null |
|
|
|
this.temp.name = null |
|
|
|
let tree = this.$refs.tree.$refs.tree |
|
|
|
let tree = this.$refs.tree.$refs.tree |
|
|
|
tree.setCurrentKey() |
|
|
|
tree.setCurrentKey() |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -182,6 +210,7 @@ export default { |
|
|
|
more(row) { |
|
|
|
more(row) { |
|
|
|
this.row = row |
|
|
|
this.row = row |
|
|
|
this.detailDialog = true |
|
|
|
this.detailDialog = true |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|