|
|
@@ -9,51 +9,135 @@
|
|
|
{{ information.informationCode }}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item>
|
|
|
- <template slot="label"> 舟皿名称 </template>
|
|
|
+ <template slot="label"> 原料名称 </template>
|
|
|
{{ information.informationName }}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item>
|
|
|
- <template slot="label"> 型号</template>
|
|
|
- {{ information.modelType }}
|
|
|
+ <template slot="label"> 牌号</template>
|
|
|
+ {{ information.brandNum }}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item>
|
|
|
- <template slot="label"> 规格 </template>
|
|
|
- {{ information.specification }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item :span="2">
|
|
|
- <template slot="label"> 分类 </template>
|
|
|
- {{information.classificationUrl}}
|
|
|
+ <template slot="label"> 计量单位 </template>
|
|
|
+ {{ information.measuringUnit }}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item>
|
|
|
- <template slot="label"> 长/宽/高(mm) </template>
|
|
|
- {{information.extendField.length}}/{{information.extendField.width}}/{{information.extendField.high}}
|
|
|
+ <template slot="label"> 包装单位 </template>
|
|
|
+ {{ information.packingUnit }}
|
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item>
|
|
|
- <template slot="label"> 计量单位</template>
|
|
|
- {{information.measuringUnit}}
|
|
|
+ <el-descriptions-item :span="2">
|
|
|
+ <template slot="label"> 分类 </template>
|
|
|
+ {{ information.classificationUrl }}
|
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
+
|
|
|
<div class="basic-details-title border-none">
|
|
|
- <span class="border-span">舟皿明细</span>
|
|
|
+ <span class="border-span">原料明细</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-tabs v-model="activeName" type="card" @tab-click="tabClick" class="basic-tab">
|
|
|
- <el-tab-pane :label="`在用(${countInfo.inUseSum?countInfo.inUseSum:'0'})`" name="inUse" >
|
|
|
+ <el-form label-width="80px" :model="searchForm" ref="formName">
|
|
|
+ <el-row>
|
|
|
+ <el-col :md="6" :xs="8" :sm="8">
|
|
|
+ <el-form-item
|
|
|
+ :label="activeName == 'inLibrary' ? '入库单号' : '出库单号'"
|
|
|
+ prop=""
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="searchForm.outInCode"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :md="6" :xs="8" :sm="8">
|
|
|
+ <el-form-item label="批次号" prop="">
|
|
|
+ <el-input
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="searchForm.batchNum"
|
|
|
+ ></el-input
|
|
|
+ ></el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :md="12" :xs="12" :sm="12" style="text-align: right">
|
|
|
+ <el-button icon="el-icon-refresh-left" size="small" @click="reset"
|
|
|
+ >重置</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="small"
|
|
|
+ @click="doSearch"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <div class="tabbox">
|
|
|
+ <el-tabs v-model="activeName" type="card" @tab-click="tabClick">
|
|
|
+ <el-tab-pane
|
|
|
+ :label="`在用(${countInfo.inUseSum ? countInfo.inUseSum : '0'})`"
|
|
|
+ name="inUse"
|
|
|
+ >
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane :label="`在库(${countInfo.inLibrarySum?countInfo.inLibrarySum:'0'})`" name="inLibrary">
|
|
|
+ <el-tab-pane
|
|
|
+ :label="`在库(${
|
|
|
+ countInfo.inLibrarySum ? countInfo.inLibrarySum : '0'
|
|
|
+ })`"
|
|
|
+ name="inLibrary"
|
|
|
+ >
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane :label="`消耗(${countInfo.consumeSum?countInfo.consumeSum:'0'})`" name="hasConsume">
|
|
|
+ <el-tab-pane
|
|
|
+ :label="`消耗(${
|
|
|
+ countInfo.consumeSum ? countInfo.consumeSum : '0'
|
|
|
+ })`"
|
|
|
+ name="hasConsume"
|
|
|
+ >
|
|
|
</el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- <el-table :data="tableData" class="table-box"
|
|
|
- :header-cell-style="{ background: '#F0F3F3', border: 'none'}"
|
|
|
+ </el-tabs>
|
|
|
+ <el-button icon="el-icon-printer" size="small" @click="handlPrint"
|
|
|
+ >打印条码</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ class="table-box"
|
|
|
+ :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
>
|
|
|
- <el-table-column type="index" label="序号" width="100"> </el-table-column>
|
|
|
- <el-table-column prop="assetCode" label="舟皿编码" > </el-table-column>
|
|
|
- <el-table-column prop="inCode" label="入库单号" v-if="activeName=='inLibrary'"> </el-table-column>
|
|
|
- <el-table-column prop="inTime" label="入库时间" v-if="activeName=='inLibrary'"> </el-table-column>
|
|
|
- <el-table-column prop="outCode" label="出库单号" v-if="activeName!='inLibrary'"> </el-table-column>
|
|
|
- <el-table-column prop="outTime" label="出库时间" v-if="activeName!='inLibrary'"> </el-table-column>
|
|
|
+ <el-table-column type="selection" width="55"> </el-table-column>
|
|
|
+ <el-table-column type="index" label="序号" width="100">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="assetCode" label="原料编码"> </el-table-column>
|
|
|
+ <el-table-column prop="batchNum" label="批次号"> </el-table-column>
|
|
|
+ <el-table-column prop="bucketNum" label="包装编码"> </el-table-column>
|
|
|
+ <el-table-column prop="minPackUnit" label="最小包装单元">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="outCode"
|
|
|
+ label="出库单号"
|
|
|
+ v-if="activeName != 'inLibrary'"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="outTime"
|
|
|
+ label="出库时间"
|
|
|
+ v-if="activeName != 'inLibrary'"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="inCode"
|
|
|
+ label="入库单号"
|
|
|
+ v-if="activeName == 'inLibrary'"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="inTime"
|
|
|
+ label="入库时间"
|
|
|
+ v-if="activeName == 'inLibrary'"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<div class="pagination">
|
|
|
<el-pagination
|
|
|
@@ -69,152 +153,242 @@
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+<!-- <QrPrint
|
|
|
+ ref="QrPrint"
|
|
|
+ @close="QrPrintClose"
|
|
|
+ :config="barCodeConfig"
|
|
|
+ :openBarCode.sync="openWindows"
|
|
|
+ /> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-// import {
|
|
|
-// getDetails
|
|
|
-// } from '@/api/stockManagement/itemInformation'
|
|
|
-// import {getAssetPage , getCount} from "@/api/ledgerAssets/asset"
|
|
|
+// import { getDetails } from '@/api/stockManagement/itemInformation'
|
|
|
+// import { getAssetPage, getCount } from '@/api/ledgerAssets/asset'
|
|
|
+// import { batchBarPrint } from '@/api/ledgerAssets/booksList'
|
|
|
+// import QrPrint from '@/components/print/printPDF.vue'
|
|
|
+ import {
|
|
|
+ getCategoryInfo
|
|
|
+ } from '@/api/ledgerAssets/boat.js';
|
|
|
export default {
|
|
|
props: {
|
|
|
- rowInfo:{
|
|
|
- type:Object ,
|
|
|
- default:{}
|
|
|
- },
|
|
|
+ rowId:{
|
|
|
+ type:String ,
|
|
|
+ default:''
|
|
|
+ },
|
|
|
},
|
|
|
+ // components: { QrPrint },
|
|
|
data () {
|
|
|
return {
|
|
|
- baseOpt: [
|
|
|
- { label: '物品编码', key: 'informationCode' },
|
|
|
- { label: '舟皿名称', key: 'informationName' },
|
|
|
- { label: '型号', key: 'modelType' },
|
|
|
- { label: '规格', key: 'specification' },
|
|
|
- { label: '分类', key: 'classificationUrl', span: 2 },
|
|
|
- { label: '长/宽/高(mm)', key: 'mm' },
|
|
|
- { label: '计量单位', key: 'measuringUnit' },
|
|
|
- ],
|
|
|
- information:{
|
|
|
- extendField:{}
|
|
|
+ information: {
|
|
|
+ extendField: {}
|
|
|
},
|
|
|
- activeName:'inUse',
|
|
|
- tableData:[],
|
|
|
+ activeName: 'inUse',
|
|
|
+ tableData: [],
|
|
|
pagination: {
|
|
|
page: 1,
|
|
|
size: 15
|
|
|
},
|
|
|
total: 0,
|
|
|
- searchForm:{
|
|
|
- assetType:'ZHOUMIN',
|
|
|
- informationId:'',
|
|
|
- source:1
|
|
|
+ searchForm: {
|
|
|
+ assetType: 'WULIAO',
|
|
|
+ informationId: '',
|
|
|
+ source: 1
|
|
|
},
|
|
|
- countInfo:{}
|
|
|
-
|
|
|
+ multipleSelection: [],
|
|
|
+ openWindows: false, //打印弹窗
|
|
|
+ barCodeConfig: [],
|
|
|
+ source: 1,
|
|
|
+ countInfo: {}
|
|
|
}
|
|
|
},
|
|
|
- watch:{
|
|
|
-
|
|
|
-
|
|
|
- },
|
|
|
+ watch: {},
|
|
|
created () {
|
|
|
+ this.getDetilInfo()
|
|
|
// this.searchForm.informationId = this.rowInfo.id
|
|
|
// this.getDetilInfo(this.rowInfo.id)
|
|
|
// this.handleList()
|
|
|
// this.getCountNum()
|
|
|
},
|
|
|
- methods:{
|
|
|
- async getDetilInfo(id){
|
|
|
- const res = await getDetails({id:id})
|
|
|
- if (res.success){
|
|
|
- this.information = res.data
|
|
|
- this.$set(this.information, 'extendField', JSON.parse(res.data.extendField))
|
|
|
- }
|
|
|
- },
|
|
|
+ methods: {
|
|
|
+ getDetilInfo(){
|
|
|
+ getCategoryInfo(this.rowId).then(res=>{
|
|
|
+ this.information = res.data
|
|
|
+ if(res.data.extendField){
|
|
|
+ this.$set(this.information, 'extendField', JSON.parse(res.data.extendField))
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
- tabClick(val){
|
|
|
- switch (this.activeName) {
|
|
|
- case 'inUse': {
|
|
|
- this.searchForm.source = 1
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'inLibrary': {
|
|
|
- this.searchForm.source = 2
|
|
|
- break;
|
|
|
- }
|
|
|
- case 'hasConsume': {
|
|
|
- this.searchForm.source = 3
|
|
|
- break;
|
|
|
- }
|
|
|
- default:
|
|
|
- break;
|
|
|
+ tabClick (val) {
|
|
|
+ switch (this.activeName) {
|
|
|
+ case 'inUse': {
|
|
|
+ this.source = 1
|
|
|
+ break
|
|
|
}
|
|
|
- this.handleList()
|
|
|
- },
|
|
|
+ case 'inLibrary': {
|
|
|
+ this.source = 2
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 'hasConsume': {
|
|
|
+ this.source = 3
|
|
|
+ break
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
+ this.searchForm.source = this.source
|
|
|
+ this.handleList()
|
|
|
+ },
|
|
|
|
|
|
- handleCurrent (page) {
|
|
|
- this.pagination.page = page
|
|
|
- this.handleList()
|
|
|
- },
|
|
|
- handleSize (size) {
|
|
|
- this.pagination.page = 1
|
|
|
- this.pagination.size = size
|
|
|
- this.handleList()
|
|
|
- },
|
|
|
+ handleCurrent (page) {
|
|
|
+ this.pagination.page = page
|
|
|
+ this.handleList()
|
|
|
+ },
|
|
|
+ handleSize (size) {
|
|
|
+ this.pagination.page = 1
|
|
|
+ this.pagination.size = size
|
|
|
+ this.handleList()
|
|
|
+ },
|
|
|
|
|
|
- async handleList () {
|
|
|
- const params = {
|
|
|
- ...this.searchForm,
|
|
|
- ...this.pagination
|
|
|
- }
|
|
|
- const res = await getAssetPage(params)
|
|
|
- if (res?.success) {
|
|
|
- this.tableData = res.data.records
|
|
|
- this.total = res.data.total
|
|
|
- // if(this.tableData.length) this.$refs.tableRef.clearSelection()
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.mapList.forEach(item => {
|
|
|
- // const row = this.tableData.find(i => i.id === item.id)
|
|
|
- // if (row) {
|
|
|
- // this.$refs.tableRef.toggleRowSelection(row, true)
|
|
|
- // }
|
|
|
- // })
|
|
|
- // })
|
|
|
- }
|
|
|
- },
|
|
|
+ // 搜索
|
|
|
+ doSearch () {
|
|
|
+ this.pagination.page = 1
|
|
|
+ this.handleList()
|
|
|
+ },
|
|
|
+ // 重置
|
|
|
+ reset () {
|
|
|
+ this.searchForm = {
|
|
|
+ assetType: 'WULIAO',
|
|
|
+ informationId: this.rowInfo.id,
|
|
|
+ source: this.source
|
|
|
+ }
|
|
|
+ this.doSearch()
|
|
|
+ },
|
|
|
+
|
|
|
+ async handleList () {
|
|
|
+ const params = {
|
|
|
+ ...this.searchForm,
|
|
|
+ ...this.pagination
|
|
|
+ }
|
|
|
+ const res = await getAssetPage(params)
|
|
|
+ if (res?.success) {
|
|
|
+ this.tableData = res.data.records
|
|
|
+ this.total = res.data.total
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- getCountNum(){
|
|
|
- const params = {
|
|
|
- assetType:'ZHOUMIN',
|
|
|
- informationId:this.rowInfo.id
|
|
|
- }
|
|
|
- getCount(params).then(res=>{
|
|
|
- if(res?.success){
|
|
|
- this.countInfo = res.data
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ handleSelectionChange (val) {
|
|
|
+ this.multipleSelection = val
|
|
|
+ },
|
|
|
|
|
|
+ QrPrintClose () {
|
|
|
+ this.barCodeConfig = []
|
|
|
+ },
|
|
|
|
|
|
- }
|
|
|
+ async handlPrint () {
|
|
|
+ this.openWindows = true
|
|
|
+ const barType = 4
|
|
|
+ let params = this.multipleSelection.map(item => {
|
|
|
+ return {
|
|
|
+ barType: barType,
|
|
|
+ bizId: item.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let _this = this
|
|
|
+ const res = await batchBarPrint(params)
|
|
|
+ async function getResList () {
|
|
|
+ for (const el of res.data) {
|
|
|
+ const fontTypeObj = { 1: '宋体', 2: '微软雅黑', 3: 'Arial' }
|
|
|
+ let item = el
|
|
|
+ item.useModeList = item.useModeList.sort((a, b) => {
|
|
|
+ return a.barAvg.substr(4) - b.barAvg.substr(4)
|
|
|
+ })
|
|
|
+ const useModeList = item.useModeList
|
|
|
+ // 条码框数据
|
|
|
+ _this.barCodeConfig.push({
|
|
|
+ putType: el.putType,
|
|
|
+ qrCode: el.qrCode,
|
|
|
+ sizeLong: el.sizeLong,
|
|
|
+ sizeWide: el.sizeWide,
|
|
|
+ code1: useModeList[0].sampleData,
|
|
|
+ code2: useModeList[1].sampleData,
|
|
|
+ code3: useModeList[2].sampleData,
|
|
|
+ code4: useModeList[3].sampleData,
|
|
|
+ code5: useModeList[4].sampleData,
|
|
|
+ code6: useModeList[5].sampleData,
|
|
|
+ code7: useModeList[6].sampleData,
|
|
|
+ code8: useModeList[7].sampleData,
|
|
|
+ code9: useModeList[8].sampleData,
|
|
|
+ code10: useModeList[9].sampleData,
|
|
|
+ code11: useModeList[10].sampleData,
|
|
|
+ code12: useModeList[11].sampleData,
|
|
|
+ code13: useModeList[12].sampleData,
|
|
|
+ code14: useModeList[13].sampleData,
|
|
|
+ fontSizeCode1: useModeList[0].fontSize,
|
|
|
+ fontSizeCode2: useModeList[1].fontSize,
|
|
|
+ fontSizeCode3: useModeList[2].fontSize,
|
|
|
+ fontSizeCode4: useModeList[3].fontSize,
|
|
|
+ fontSizeCode5: useModeList[4].fontSize,
|
|
|
+ fontSizeCode6: useModeList[5].fontSize,
|
|
|
+ fontSizeCode7: useModeList[6].fontSize,
|
|
|
+ fontSizeCode8: useModeList[7].fontSize,
|
|
|
+ fontSizeCode9: useModeList[8].fontSize,
|
|
|
+ fontSizeCode10: useModeList[9].fontSize,
|
|
|
+ fontSizeCode11: useModeList[10].fontSize,
|
|
|
+ fontSizeCode12: useModeList[11].fontSize,
|
|
|
+ fontSizeCode13: useModeList[12].fontSize,
|
|
|
+ fontSizeCode14: useModeList[13].fontSize,
|
|
|
+ typefaceCode1: fontTypeObj[useModeList[0].fontType],
|
|
|
+ typefaceCode2: fontTypeObj[useModeList[1].fontType],
|
|
|
+ typefaceCode3: fontTypeObj[useModeList[2].fontType],
|
|
|
+ typefaceCode4: fontTypeObj[useModeList[3].fontType],
|
|
|
+ typefaceCode5: fontTypeObj[useModeList[4].fontType],
|
|
|
+ typefaceCode6: fontTypeObj[useModeList[5].fontType],
|
|
|
+ typefaceCode7: fontTypeObj[useModeList[6].fontType],
|
|
|
+ typefaceCode8: fontTypeObj[useModeList[7].fontType],
|
|
|
+ typefaceCode9: fontTypeObj[useModeList[8].fontType],
|
|
|
+ typefaceCode10: fontTypeObj[useModeList[9].fontType],
|
|
|
+ typefaceCode11: fontTypeObj[useModeList[10].fontType],
|
|
|
+ typefaceCode12: fontTypeObj[useModeList[11].fontType],
|
|
|
+ typefaceCode13: fontTypeObj[useModeList[12].fontType],
|
|
|
+ typefaceCode14: fontTypeObj[useModeList[13].fontType]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ getResList()
|
|
|
+ },
|
|
|
|
|
|
+ getCountNum () {
|
|
|
+ const params = {
|
|
|
+ assetType: 'WULIAO',
|
|
|
+ informationId: this.rowInfo.id,
|
|
|
+ outInCode: this.searchForm.outInCode,
|
|
|
+ batchNum: this.searchForm.batchNum
|
|
|
+ }
|
|
|
+ getCount(params).then(res => {
|
|
|
+ if (res?.success) {
|
|
|
+ this.countInfo = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .baseinfo-container {
|
|
|
- background-color: #fff;
|
|
|
- padding: 20px;
|
|
|
- .content {
|
|
|
- padding: 0 20px;
|
|
|
- }
|
|
|
- .basic-details-title{
|
|
|
- font-size: 16px;
|
|
|
- margin: 15px 0;
|
|
|
+.baseinfo-container {
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 20px;
|
|
|
+ .tabbox {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
}
|
|
|
- .basic-tab{
|
|
|
- margin-bottom: 15px;
|
|
|
+ .content {
|
|
|
+ padding: 0 20px;
|
|
|
}
|
|
|
.upload-container {
|
|
|
display: flex;
|