| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386 |
- <template>
- <div>
- <el-card shadow="never">
- <div>
- <div class="content-detail">
- <header-title title="基本信息" size="16px"></header-title>
- <div class="mt20">
- <el-form label-width="120px">
- <el-col :span="8">
- <el-form-item label="入库单:">
- <span>{{ infoData?.bizNo?.toString() }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="入库物品类型:">
- <span>{{ handleAssetType(extInfo?.assetType) }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="入库场景:">
- <span>{{ getSceneState(infoData.bizType) }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="关联订单:">
- <span>{{ extInfo.documentSource }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="权属部门:">
- <span>{{ extInfo.deptName }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="入库登记人:">
- <span>{{ extInfo.createUserName }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="入库时间:">
- <span>{{ infoData.storageTime }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="状态:">
- <span>{{ stepsTitle }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="审核人:">
- <span>{{ infoData.verifyName }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="客户:">
- <span>{{ infoData.clientName }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="供应商:">
- <span>{{ extInfo.supplierName }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="供应商代号:">
- <template v-if="bizType == 2">{{
- extInfo.supplierMark
- }}</template>
- <template v-if="bizType != 2">{{
- extInfo.supplierCode
- }}</template>
- </el-form-item>
- </el-col>
- <!-- <el-col :span="8">
- <el-form-item label="产地:">
- <span>{{ extInfo.provenance }}</span>
- </el-form-item>
- </el-col> -->
- <!-- <el-col :span="8">
- <el-form-item label="送货人:">
- <span>{{ infoData.fromUser }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="送货人联系方式:">
- <span>{{ extInfo.deliveryPhone }}</span>
- </el-form-item>
- </el-col> -->
- <el-col :span="8" v-if="isUpload">
- <el-form-item prop="qualityFile" label="回执附件">
- <fileMain v-model="qualityFile" />
- </el-form-item>
- </el-col>
- <el-col v-else :span="8">
- <el-form-item label="附件:">
- <fileMain v-model="infoData.qualityFile" type="view" />
- <!-- <el-link
- type="primary"
- v-for="item in infoData.qualityFile"
- @click="download(item)"
- :key="item.name"
- >{{ item.name }}</el-link
- > -->
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="备注:">
- <span>{{ infoData.remark }}</span>
- </el-form-item>
- </el-col>
- </el-form>
- </div>
- </div>
- <div class="content-detail mt20">
- <header-title title="产品信息" size="16px"></header-title>
- <ele-pro-table
- ref="productListTable"
- :datasource="productList"
- :columns="columns"
- :needPage="false"
- max-height="300px"
- row-key="id"
- :cache-key="cacheKeyUrl"
- @columns-change="handleColumnChange"
- >
- <template v-slot:packingQuantity="{ row }">
- {{ row.packingQuantity }} {{ row.packingUnit }}
- </template>
- <template v-slot:minPackingQuantity="{ row }">
- {{ row.minPackingQuantity }} {{ row.measureUnit }} /{{ row.packingUnit }}
- </template>
- <template v-slot:isUnpack="{ row }">
- {{ row.isUnpack == 1 ? '是' : '否' }}
- </template>
- <template v-slot:unitPrice="{ row }">
- {{ row.unitPrice ? row.unitPrice + '/元' : '' }}
- </template>
- <template v-slot:totalMoney="{ row }">
- {{ row.totalMoney ? row.totalMoney : 0 }}
- </template>
- <template v-slot:provenance="{ row }">
- {{ row.provenance && row.provenance.map((item) => getDictValue('产地', item)).join(',') }}
- </template>
- </ele-pro-table>
- </div>
- <div class="mt20">
- <header-title :title="`包装明细`" size="16px"></header-title>
- <el-table
- ref="showPackingListTable"
- :data="showPackingList"
- tooltip-effect="dark"
- :max-height="300"
- :row-class-name="tableRowClassName"
- :header-cell-style="rowClass"
- border
- v-el-table-infinite-scroll="pickingHandleScroll"
- >
- <el-table-column label="序号" type="index" width="50">
- </el-table-column>
- <el-table-column
- label="批次号"
- prop="batchNo"
- width="80"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="包装编码"
- prop="packageNo"
- width="130"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="名称"
- prop="categoryName"
- width="120"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="编码"
- prop="categoryCode"
- width="120"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="型号"
- prop="categoryModel"
- width="80"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="规格"
- prop="specification"
- width="80"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="牌号"
- prop="brandNum"
- width="80"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <!-- <el-table-column label="编码" prop="categoryCode" :show-overflow-tooltip="true"></el-table-column>
- <el-table-column label="名称" prop="categoryName" :show-overflow-tooltip="true"></el-table-column>
- <el-table-column label="批次号" prop="batchNo" :show-overflow-tooltip="true"></el-table-column> -->
- <el-table-column
- label="发货条码"
- prop="barcodes"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="包装数量"
- prop="packingQuantity"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="包装单位"
- prop="packingUnit"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="计量数量"
- prop="measureQuantity"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="计量单位"
- prop="measureUnit"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="物料代号"
- prop="materielDesignation"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <el-table-column
- label="客户代号"
- prop="clientCode"
- :show-overflow-tooltip="true"
- >
- <template slot-scope="{ row, $index }">
- <span v-if="bizType != 2">{{ row?.clientCode }}</span>
- <span v-if="bizType == 2">{{ row?.customerMark }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="刻码"
- prop="engrave"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <el-table-column
- label="重量"
- prop="weight"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <el-table-column
- label="重量单位"
- prop="weightUnit"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <el-table-column label="机型" prop="modelKey" width="200">
- </el-table-column>
- <el-table-column label="颜色" prop="colorKey" width="200">
- </el-table-column>
- <el-table-column
- label="供应商"
- prop="supplierName"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <el-table-column
- label="供应商代号"
- prop="supplierCode"
- width="120"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <el-table-column
- label="质检结果"
- prop="result"
- :show-overflow-tooltip="true"
- >
- <template slot-scope="{ row }">
- <span>{{ qualityResults[row.result] }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="质检状态"
- prop="status"
- :show-overflow-tooltip="true"
- >
- <template slot-scope="{ row }">
- <span>{{ qualityStatus[row.status] }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="仓库"
- prop="warehouseName"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <el-table-column
- label="货区"
- prop="areaName"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <el-table-column
- label="货架"
- prop="goodsShelfName"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <el-table-column
- label="货位"
- prop="goodsAllocationName"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <el-table-column
- label="生产日期"
- prop="productionDate"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <el-table-column
- label="采购日期"
- prop="purchaseDate"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <el-table-column
- label="失效日期"
- prop="expireDate"
- :show-overflow-tooltip="true"
- >
- </el-table-column>
- <!-- <el-table-column
- label="盘具"
- prop="reelSpecification"
- :show-overflow-tooltip="true"
- >
- </el-table-column> -->
- </el-table>
- </div>
- <!-- <div class="mt20" v-if="bizType != '2'">
- <header-title :title="`物料明细`" size="16px"> </header-title>
- <el-table
- ref="multipleTable"
- :data="showMaterialList"
- tooltip-effect="dark"
- :max-height="300"
- :row-class-name="tableRowClassName"
- :header-cell-style="rowClass"
- border
- style="width: 100%"
- stripe
- height="300px"
- v-el-table-infinite-scroll="materielHandleScroll"
- >
- <el-table-column label="序号" type="index" width="50">
- </el-table-column>
- <el-table-column
- label="编码"
- prop="categoryCode"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="名称"
- prop="categoryName"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column label="批次号" prop="batchNo"></el-table-column>
- <el-table-column
- label="物料编码"
- prop="materialCode"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="发货条码"
- prop="barcodes"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="计价方式"
- prop="pricingWay"
- :show-overflow-tooltip="true"
- >
- <template slot-scope="{ row, $index }">
- <span v-if="row.pricingWay == 1">数量</span>
- <span v-if="row.pricingWay == 2">重量</span>
- </template>
- </el-table-column>
- <el-table-column
- label="计量数量"
- prop="measureQuantity"
- ></el-table-column>
- <el-table-column
- label="计量单位"
- prop="measureUnit"
- ></el-table-column>
- <el-table-column label="物料代号" prop="materielDesignation">
- </el-table-column>
- <el-table-column label="客户代号" prop="clientCode">
- <template slot-scope="{ row, $index }">
- <span v-if="bizType != 2">{{ row?.clientCode }}</span>
- <span v-if="bizType == 2">{{ row?.customerMark }}</span>
- </template>
- </el-table-column>
- <el-table-column label="刻码" prop="engrave"> </el-table-column>
- <el-table-column width="100" label="重量" prop="weight">
- </el-table-column>
- <el-table-column label="重量单位" prop="weightUnit">
- </el-table-column>
- <el-table-column label="质检结果" prop="result" width="120">
- <template slot-scope="{ row }">
- <span>{{ qualityResults[row.result] }}</span>
- </template>
- </el-table-column>
- <el-table-column label="质检状态" prop="status" width="120">
- <template slot-scope="{ row }">
- <span>{{ qualityStatus[row.status] }}</span>
- </template>
- </el-table-column>
- </el-table>
- </div>-->
- </div>
- </el-card>
- </div>
- </template>
- <script>
- import elTableInfiniteScroll from 'el-table-infinite-scroll';
- // import fileUpload from '@/BIZComponents/addDoc/index.vue';
- import { getFile } from '@/api/system/file/index.js';
- import storageApi from '@/api/warehouseManagement';
- import { allCategoryLevel } from '@/api/classifyManage';
- import {
- useDictLabel,
- sceneState,
- qualityStatus,
- qualityResults
- } from '@/utils/dict/index';
- import { mapGetters, mapActions } from 'vuex';
- import { parameterGetByCode } from '@/api/main/index.js';
- import tableColumnsMixin from '@/mixins/tableColumnsMixin.js';
- export default {
- directives: {
- 'el-table-infinite-scroll': elTableInfiniteScroll
- },
- mixins: [tableColumnsMixin],
- // components: { fileUpload },
- props: {
- bizType: {
- type: String,
- default: ''
- },
- businessId: {
- type: String,
- default: ''
- },
- isUpload: {
- type: Boolean,
- default: false
- },
- isInterior: {
- type: Boolean,
- default: false
- },
- isIds: {
- //多个入库单ID
- type: Boolean,
- default: false
- }
- },
- data() {
- return {
- cacheKeyUrl: 'stockManagement-productList-20260508',
- dinamicoColumns: [], // 动态表头
- qualityFile: [], // 回执附件
- qualityStatus, // 质检状态 0未检 1已检
- qualityResults, // 质检结果 0无 1合格 2不合格
- productList: [], // 产品列表
- showPackingList: [], // 展示的包装列表
- packingList: [], // 包装列表
- showMaterialList: [], // 展示物料列表
- materialList: [], // 物料列表
- extInfo: {}, // 扩展信息
- pageSize: 20,
- pickingPageNum: 1,
- materielPageNum: 1,
- codeList: [],
- infoData: {},
- stepsTitle: '已完成',
- stepsStatus: 'success',
- active: 0,
- isPrice: 1,
- columnsVersion: 1,
- tabMixinsInit: true,
- };
- },
- watch: {
- 'infoData.verifyStatus': {
- immediate: true,
- handler(val) {
- if (val == 0) {
- this.active = 1;
- this.stepsTitle = '未审核';
- this.stepsStatus = 'wait';
- } else if (val == 1) {
- this.active = 2;
- this.stepsTitle = '审核中';
- this.stepsStatus = 'process';
- } else if (val == 2) {
- this.active = 2;
- this.stepsTitle = '审核通过';
- this.stepsStatus = 'success';
- } else if (val == 3) {
- this.active = 2;
- this.stepsTitle = '驳回';
- this.stepsStatus = 'error';
- }
- }
- },
- businessId(val) {
- if (val) {
- this._getInfo(val);
- }
- }
- },
- computed: {
- ...mapGetters(['getDictValue']),
- clientEnvironmentId() {
- return this.$store.state.user.info.clientEnvironmentId;
- },
- columns() {
- let columnsVersion = this.columnsVersion;
- const columns = [
- {
- columnKey: 'index',
- label: '序号',
- type: 'index',
- width: 50,
- align: 'center'
- }
- ];
- if (this.isIds) {
- columns.push({
- minWidth: 150,
- label: '入库单号',
- prop: 'bizNo',
- align: 'center',
- showOverflowTooltip: true
- });
- }
- columns.push(
- {
- label: '仓库',
- prop: 'warehouseName',
- showOverflowTooltip: true
- },
- {
- label: '编码',
- prop: 'categoryCode',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '名称',
- align: 'center',
- prop: 'categoryName',
- showOverflowTooltip: true
- }
- );
- if (this.clientEnvironmentId == 4) {
- columns.push({
- label: '级别',
- prop: 'level',
- align: 'center'
- });
- }
- columns.push(
- {
- label: '型号',
- align: 'center',
- prop: 'categoryModel',
- showOverflowTooltip: true
- },
- {
- label: '规格',
- align: 'center',
- prop: 'specification',
- showOverflowTooltip: true
- },
- {
- label: '牌号',
- align: 'center',
- prop: 'brandNum',
- showOverflowTooltip: true
- }
- );
- // 动态表头
- if (this.dinamicoColumns && this.dinamicoColumns.length) {
- this.dinamicoColumns.forEach((item) => {
- columns.push({
- label: item.label,
- align: item.align,
- prop: item.prop,
- showOverflowTooltip: item.showOverflowTooltip
- });
- });
- }
- columns.push({
- label: '批次号',
- prop: 'batchNo',
- align: 'center',
- showOverflowTooltip: true
- });
- if (this.clientEnvironmentId == 3) {
- columns.push({
- label: '包装数量',
- prop: 'packingQuantity',
- align: 'center',
- slot: 'packingQuantity'
- },
- {
- label: '最小包装单元',
- align: 'center',
- width: 120,
- prop: 'minPackingQuantity',
- slot: 'minPackingQuantity'
- });
- } else {
- columns.push(
- {
- label: '包装数量',
- prop: 'packingQuantity',
- width: 80
- },
- {
- label: '包装单位',
- prop: 'packingUnit'
- }
- );
- }
- columns.push(
- {
- label: '允许拆包',
- prop: 'isUnpack',
- width: 100,
- align: 'center',
- slot: 'isUnpack'
- },
- {
- label: '计量数量',
- prop: 'measureQuantity',
- showOverflowTooltip: true
- },
- {
- label: '计量单位',
- prop: 'measureUnit'
- },
- {
- label: '重量',
- prop: 'weight',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '重量单位',
- prop: 'weightUnit',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '生产要求',
- align: 'center',
- width: 200,
- prop: 'productionRequirements',
- showOverflowTooltip: true
- },
- {
- label: '机型',
- prop: 'modelKey',
- width: 200
- },
- {
- label: '颜色',
- prop: 'colorKey',
- width: 200
- },
- {
- label: '盘具',
- prop: 'reelSpecification',
- width: 200
- },
- );
- if (this.isPrice == 1) {
- columns.push(
- {
- label: '单价',
- prop: 'unitPrice',
- align: 'center',
- slot: 'unitPrice'
- },
- {
- label: '金额',
- align: 'center',
- prop: 'totalMoney',
- showOverflowTooltip: true,
- slot: 'totalMoney'
- }
- );
- }
- if (this.clientEnvironmentId == 4) {
- columns.push({
- label: '采购原因',
- align: 'center',
- prop: 'purpose',
- showOverflowTooltip: true
- });
- }
- columns.push(
- {
- label: '供应商',
- prop: 'supplierName',
- showOverflowTooltip: true
- },
- {
- label: '供应商代号',
- prop: 'supplierCode',
- width: 120,
- showOverflowTooltip: true
- }
- );
- if (this.bizType == 2) {
- columns.push({
- label: '产地',
- align: 'center',
- prop: 'provenance',
- showOverflowTooltip: true,
- width: 120,
- slot: 'provenance'
- });
- }
- columns.push(
- {
- label: '生产日期',
- prop: 'detailProductionDate',
- showOverflowTooltip: true
- },
- {
- label: '采购日期',
- prop: 'detailPurchaseDate',
- showOverflowTooltip: true
- },
- {
- label: '失效日期',
- prop: 'detailExpireDate',
- showOverflowTooltip: true
- }
- );
- return columns;
- },
- packingColumns() {
- return [
- {
- columnKey: 'index',
- label: '序号',
- type: 'index',
- width: 50,
- align: 'center'
- },
- {
- label: '批次号',
- prop: 'batchNo',
- width: 80,
- showOverflowTooltip: true
- },
- {
- label: '包装编码',
- prop: 'packageNo',
- width: 130,
- showOverflowTooltip: true
- },
- {
- label: '名称',
- prop: 'categoryName',
- width: 120,
- showOverflowTooltip: true
- },
- {
- label: '编码',
- prop: 'categoryCode',
- width: 120,
- showOverflowTooltip: true
- },
- {
- label: '型号',
- prop: 'categoryModel',
- width: 80,
- showOverflowTooltip: true
- },
- {
- label: '规格',
- prop: 'specification',
- width: 80,
- showOverflowTooltip: true
- },
- {
- label: '牌号',
- prop: 'brandNum',
- width: 80,
- showOverflowTooltip: true
- },
- {
- label: '发货条码',
- prop: 'barcodes',
- showOverflowTooltip: true
- },
- {
- label: '包装数量',
- prop: 'packingQuantity',
- showOverflowTooltip: true
- },
- {
- label: '包装单位',
- prop: 'packingUnit',
- showOverflowTooltip: true
- },
- {
- label: '计量数量',
- prop: 'measureQuantity',
- showOverflowTooltip: true
- },
- {
- label: '计量单位',
- prop: 'measureUnit',
- showOverflowTooltip: true
- },
- {
- label: '物料代号',
- prop: 'materielDesignation',
- showOverflowTooltip: true
- },
- {
- label: '客户代号',
- prop: 'clientCode',
- showOverflowTooltip: true,
- slot: 'clientCode'
- },
- {
- label: '刻码',
- prop: 'engrave',
- showOverflowTooltip: true
- },
- {
- label: '重量',
- prop: 'weight',
- showOverflowTooltip: true
- },
- {
- label: '重量单位',
- prop: 'weightUnit',
- showOverflowTooltip: true
- },
- {
- label: '机型',
- prop: 'modelKey',
- width: 200
- },
- {
- label: '颜色',
- prop: 'colorKey',
- width: 200
- },
- {
- label: '供应商',
- prop: 'supplierName',
- showOverflowTooltip: true
- },
- {
- label: '供应商代号',
- prop: 'supplierCode',
- width: 120,
- showOverflowTooltip: true
- },
- {
- label: '质检结果',
- prop: 'result',
- showOverflowTooltip: true,
- slot: 'result'
- },
- {
- label: '质检状态',
- prop: 'status',
- showOverflowTooltip: true,
- slot: 'status'
- },
- {
- label: '仓库',
- prop: 'warehouseName',
- showOverflowTooltip: true
- },
- {
- label: '货区',
- prop: 'areaName',
- showOverflowTooltip: true
- },
- {
- label: '货架',
- prop: 'goodsShelfName',
- showOverflowTooltip: true
- },
- {
- label: '货位',
- prop: 'goodsAllocationName',
- showOverflowTooltip: true
- },
- {
- label: '生产日期',
- prop: 'productionDate',
- showOverflowTooltip: true
- },
- {
- label: '采购日期',
- prop: 'purchaseDate',
- showOverflowTooltip: true
- },
- {
- label: '失效日期',
- prop: 'expireDate',
- showOverflowTooltip: true
- }
- ];
- }
- },
- mounted() {
- this.getFieldModel();
- this.requestDict('类型用途');
- this.requestDict('产地');
- this.getAllCategoryType();
- this._getInfo(this.businessId);
- },
- created() {
- //仓库出入库是否显示金额(0:不显示 1:显示)
- parameterGetByCode({
- code: 'wms_price'
- }).then((res) => {
- this.isPrice = res.value;
- });
- },
- methods: {
- // 获取动态表头
- getFieldModel() {
- storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
- let newRes = res.map((m) => {
- return {
- prop: 'extField.' + m.prop,
- label: m.label,
- align: 'center',
- showOverflowTooltip: true
- };
- });
- this.dinamicoColumns = [...newRes];
- });
- },
- //获取回执附件
- getQualityFile() {
- return { qualityFile: this.qualityFile, id: this.infoData.id };
- },
- pickingHandleScroll() {
- console.log('---------pickingHandleScroll------------');
- if (this.showPackingList.length < this.packingList.length) {
- if (this.packingList.length > this.pageSize) {
- this.pickingPageNum += 1;
- }
- this.pickingFetchData();
- }
- },
- pickingFetchData() {
- const start = (this.pickingPageNum - 1) * this.pageSize;
- const end = start + this.pageSize;
- this.showPackingList = this.showPackingList.concat(
- this.packingList.slice(start, end)
- );
- },
- materielHandleScroll() {
- console.log('---------materielHandleScroll------------');
- if (this.showMaterialList.length < this.materialList.length) {
- if (this.materialList.length > this.pageSize) {
- this.materielPageNum += 1;
- }
- this.materielFetchData();
- }
- },
- materielFetchData() {
- const start = (this.materielPageNum - 1) * this.pageSize;
- const end = start + this.pageSize;
- this.showMaterialList = this.showMaterialList.concat(
- this.materialList.slice(start, end)
- );
- console.log(this.showMaterialList);
- },
- ...mapActions('dict', ['requestDict']),
- getSceneState: useDictLabel(sceneState),
- handleAssetType(r) {
- if (r) {
- let arr = r.split(',');
- const filteredData = this.codeList.filter((item) =>
- arr.includes(item.dictCode)
- );
- return filteredData.map((item) => item.dictValue).join(',');
- }
- // const code = this.codeList.find((item) => item.dictCode == r);
- // return code?.dictValue;
- },
- tableRowClassName({ row, rowIndex }) {
- console.log(row);
- if (row.result == 2) {
- return 'warning-row';
- } else {
- return '';
- }
- },
- rowClass({ row, column, rowIndex, columnIndex }) {
- if (rowIndex === 1) {
- return {
- display: 'none',
- background: '#EEEEEE'
- };
- }
- return { background: '#0000' };
- },
- async getAllCategoryType() {
- const { data } = await allCategoryLevel();
- this.codeList = data.map((item) => {
- return { dictCode: item.id, dictValue: item.name };
- });
- },
- async _getInfo(id) {
- if (!id) return;
- let res = null;
- let resAll = null;
- if (this.isInterior) {
- res = await storageApi.getInboundDetailsById(id);
- } else if (this.isIds) {
- resAll = await storageApi.getInboundDetailsByIds(id);
- } else {
- res = await storageApi.getInfoBySourceBizNo(id);
- }
- console.log(
- 'idsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss',
- this.isIds
- );
- if (this.isIds) {
- res = JSON.parse(JSON.stringify(resAll[0]));
- this.extInfo = resAll[0].extInfo;
- res['outInDetailList'] = [];
- resAll.forEach((item) => {
- item.outInDetailList.forEach((val) => {
- val['bizNo'] = item.bizNo;
- res['outInDetailList'].push(val);
- });
- });
- res['bizNo'] = resAll.map((item) => item.bizNo);
- this.infoData = res;
- console.log('resAll---------------', resAll);
- } else {
- this.infoData = res;
- this.extInfo = res.extInfo;
- console.log(
- res,
- 'resresresresresresresresresresresresresresresresresresresresres2222'
- );
- }
- console.log('===', res);
- this.productList = res?.outInDetailList?.map(
- (productItem, productIndex) => {
- // if (this.isIds) {
- // productItem['bizNo'] = res.bizNo[productIndex];
- // }
- return {
- ...productItem,
- outInDetailRecordRequestList:
- productItem.outInDetailRecordRequestList.map((packingItem) => {
- return {
- ...packingItem,
- categoryName: productItem.categoryName,
- categoryCode: productItem.categoryCode,
- supplierCode: productItem.supplierCode,
- supplierName: productItem.supplierName,
- materialDetailList: packingItem.materialDetailList.map(
- (materialItem) => {
- return {
- ...materialItem,
- categoryName: productItem.categoryName,
- categoryCode: productItem.categoryCode
- };
- }
- )
- };
- })
- };
- }
- );
- // 获取包装维度数据
- const arr = [];
- for (const key in this.productList) {
- for (const k in this.productList[key].outInDetailRecordRequestList) {
- arr.push({
- ...this.productList[key].outInDetailRecordRequestList[k]
- });
- }
- }
- this.packingList = arr;
- // 获取物料维度数据
- let iArr = [];
- arr.forEach((item) => {
- item.materialDetailList.forEach((ele) => {
- iArr.push({ ...ele });
- });
- });
- this.materialList = iArr;
- console.log(this.packingList);
- console.log(this.materialList);
- this.pickingFetchData();
- this.materielFetchData();
- console.log(this.productList, 'this.productList');
- },
- download(row) {
- if (row.storePath) {
- getFile({ objectName: row.storePath }, row.name);
- }
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- ::v-deep .warning-row {
- color: red;
- }
- ::v-deep .page-title {
- border-bottom: none;
- }
- ::v-deep .page-title-div {
- width: 100%;
- }
- .stepsStatus {
- width: 40%;
- margin: 0 auto;
- }
- .el-form-item {
- margin-bottom: 10px;
- }
- .p20 {
- padding: 20px;
- }
- .flex {
- display: flex;
- }
- .title {
- justify-content: space-between;
- border-bottom: 1px solid #ccc;
- padding-bottom: 5px;
- span {
- font-size: 16px;
- }
- .col {
- padding-left: 40px;
- font-size: 14px;
- color: #aaaaaa;
- }
- }
- .degree {
- margin-right: 10px;
- padding: 0px 15px;
- color: #fff;
- font-size: 13px;
- line-height: 23px;
- border-radius: 23px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- span {
- width: 5px;
- height: 5px;
- border-radius: 100%;
- margin-right: 6px;
- background-color: #fff;
- }
- }
- .red {
- background-color: rgb(163, 0, 20);
- }
- .blue {
- background-color: #1989fa;
- }
- .createdInfo {
- justify-content: space-around;
- margin-top: 10px;
- font-size: 14px;
- .col {
- color: #6e6e6e;
- padding-right: 10px;
- }
- }
- .mt40 {
- margin-top: 40px;
- }
- .custSteps {
- margin-top: 20px;
- margin-left: 70px;
- .box {
- width: 158px;
- border: 1px solid #ccc;
- padding: 10px;
- flex-direction: row;
- flex-wrap: wrap;
- // justify-content: space-between;
- font-size: 12px;
- color: #9e9e9e;
- .x {
- width: 20px;
- height: 15px;
- margin-right: 5px;
- }
- .q {
- background-color: #d0e4d5;
- }
- .b {
- background-color: #1989fa;
- }
- .g {
- background-color: #157a2c;
- }
- .r {
- background-color: #a30014;
- }
- .a {
- align-items: center;
- margin-bottom: 10px;
- }
- .mr10 {
- margin-right: 10px;
- }
- .mb0 {
- margin-bottom: 0;
- }
- }
- .stepsInfo {
- // flex: 1;
- width: 483px;
- }
- }
- .mt20 {
- margin-top: 20px;
- }
- .content-detail {
- overflow: hidden;
- }
- .executor {
- font-size: 14px;
- .col {
- color: #6e6e6e;
- padding-right: 10px;
- }
- }
- .result {
- justify-content: space-around;
- }
- .mr20 {
- margin-right: 20px;
- }
- .details {
- font-size: 14px;
- margin-bottom: 10px;
- }
- .customSteps {
- margin-top: 40px;
- font-size: 14px;
- margin-left: 80px;
- .time {
- font-size: 12px;
- color: #6e6e6e;
- margin-right: 20px;
- position: relative;
- &::after {
- content: '';
- width: 1px;
- height: 100%;
- background-color: #157a2c;
- position: absolute;
- right: -26px;
- }
- }
- .flex:last-child {
- .time {
- &::after {
- display: none;
- }
- }
- }
- .round {
- margin-right: 20px;
- width: 10px;
- height: 10px;
- border-radius: 100%;
- background-color: #157a2c;
- position: relative;
- span {
- position: absolute;
- top: 50%;
- left: 50%;
- width: 4px;
- height: 4px;
- background-color: #fff;
- border-radius: 100%;
- transform: translate(-2px, -2px);
- }
- }
- .text {
- .info {
- margin-top: 10px;
- width: 955px;
- background-color: #f0f3f3;
- overflow: hidden;
- padding: 10px;
- margin-bottom: 10px;
- }
- }
- }
- .switch_left li {
- border-right: 1px solid rgba(222, 222, 222, 1);
- border-left: 1px solid rgba(222, 222, 222, 1);
- }
- </style>
|