| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805 |
- <template>
- <view class="mainBox">
- <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="入库详情" @clickLeft="back">
- <!-- @clickRight="handleScan"
- right-icon="scan"
- > -->
- <!--右菜单-->
- <template slot="float">
- <!-- <view class="nav-icon-caozuo rightNav" @click="getsure">
- <u-button type="success" size="small" class="u-reset-button" text="确定"></u-button>
- </view> -->
- </template>
- </uni-nav-bar>
- <u-form labelPosition="left" :model="formData" :rules="rules" ref="formRef" labelWidth="260" labelAlign="right" class="baseForm">
- <u-form-item label="入库单号" borderBottom prop="assetType">
- <view class="assetType_box">{{ formData.bizNo }}</view>
- </u-form-item>
- <u-form-item label="物品类型" borderBottom prop="assetType">
- <view class="assetType_box">
- {{ getGoodsListsLabel(formData.extInfo.assetType) }}
- </view>
- </u-form-item>
- <u-form-item label="入库场景" prop="bizType" borderBottom>
- <view class="assetType_box">{{ sceneState.filter(item => item.value == formData.bizType)[0].text }}</view>
- </u-form-item>
- <u-form-item label="来源单据" prop="documentSource" borderBottom>
- <view class="assetType_box">{{ formData.sourceBizNo }}</view>
- </u-form-item>
- <u-form-item label="入库时间" prop="createUserName" borderBottom>
- <view class="assetType_box" @click="timeShow = true">{{ formData.storageTime }}</view>
- </u-form-item>
- <u-form-item label="入库登记人" prop="createUserName" borderBottom>
- <view class="assetType_box" @click="timeShow = true">{{ formData.createUserName }}</view>
- </u-form-item>
- <u-form-item label="送货人" prop="deliveryName" borderBottom>
- <view class="assetType_box" @click="timeShow = true">{{ formData.fromUser }}</view>
- </u-form-item>
- <u-form-item label="送货人联系方式" prop="deliveryPhone" borderBottom>
- <view class="assetType_box" @click="timeShow = true">{{ formData.extInfo.deliveryPhone }}</view>
- </u-form-item>
- <u-form-item label="状态" prop="stautus" borderBottom>
- <view class="assetType_box" @click="timeShow = true">{{ statusLabelList[formData.verifyStatus] }}</view>
- </u-form-item>
- <u-form-item label="备注" prop="remark" borderBottom>
- <view class="assetType_box" @click="timeShow = true">{{ formData.remark }}</view>
- </u-form-item>
- </u-form>
- <uni-collapse ref="collapse" v-model="collapseOpen">
- <uni-collapse-item :typeOpen="1" title="" name="collapse1" :open="true" :key="detailOpen" :show-animation="true">
- <template v-slot:title>
- <view class="detail-box">
- <view data-v-41027c34="" class="uni-collapse-item__title-wrap">
- <view data-v-41027c34="" class="uni-collapse-item__title-box uni-collapse-item__title-box-base">
- <text data-v-41027c34="" class="tag tag-base"><text></text></text>
- <text data-v-41027c34="" class="uni-collapse-item__title-text"><text>入库明细</text></text>
- </view>
- </view>
- <!-- <u-button type="primary" size="small" text="扫码添加" @click.native.stop="selectType"></u-button> -->
- <!-- <u-button type="success" size="small" class="selectEnterType" text="手动添加" @click.native.stop="selectType"></u-button> -->
- </view>
- </template>
- <u-form
- labelPosition="left"
- :model="{ productList: productList }"
- ref="lisrFormRef"
- labelWidth="150"
- :rules="listRules"
- errorType="none"
- labelAlign="right"
- :labelStyle="{
- fontSize: '28rpx'
- }">
- <view class="listContent">
- <view class="listBox" v-for="(item, index) in productList" :key="index">
- <view class="listTit">
- <view class="name">{{ item.categoryCode }}</view>
- </view>
- <view class="listCont" :class="{ save: item.isSave }">
- <view class="item w100">
- <u-form-item :label="`物品名称`">
- {{ item.categoryName }}
- </u-form-item>
- </view>
- <view class="item w100">
- <u-form-item label="包装规格" prop="packingSpecificationLabel">
- <u-tag style="margin-right: 5rpx" v-for="ite in item.packingSpecificationLabel" :text="ite"></u-tag>
- </u-form-item>
- </view>
- <view class="item">
- <u-form-item label="批次号" :prop="`productList.${index}.batchNo`">
- {{ item.batchNo }}
- </u-form-item>
- </view>
- <view class="item">
- <u-form-item label="数量" :prop="`productList.${index}.packingQuantity`">
- {{ item.packingQuantity }}
- </u-form-item>
- </view>
- <view class="item">
- <u-form-item label="包装单位" :prop="`productList.${index}.packingUnit`">
- {{ item.packingUnit }}
- </u-form-item>
- </view>
- <view class="item">
- <u-form-item label="仓库" :prop="`productList.${index}.warehouseId`">
- {{ item.warehouseName }}
- </u-form-item>
- </view>
- <view class="item w100">
- <u-form-item label="供应商" :prop="`productList.${index}.supplierName`">
- {{ item.supplierName }}
- </u-form-item>
- </view>
- <view class="item">
- <u-form-item label="计量数量" prop="measureQuantity">{{ item.measureQuantity }}</u-form-item>
- </view>
- <view class="item">
- <u-form-item label="计量单位" prop="measureUnit">{{ item.measureUnit }}</u-form-item>
- </view>
- <view class="item">
- <u-form-item label="重量" prop="weight">{{ item.weight }}</u-form-item>
- </view>
- <view class="item">
- <u-form-item label="重量单位" prop="weightUnit">{{ item.weightUnit }}</u-form-item>
- </view>
- <view class="item">
- <u-form-item label="是否拆包" prop="isUnpack">{{ item.isUnpack ? '是' : '否' }}</u-form-item>
- </view>
- </view>
- <u-list @scrolltolower="scrolltolower" class="z_list" style="height: 100% !important">
- <view class="material rx-ss" v-for="(ite, idx) in item.outInDetailRecordRequestList" :key="idx">
- <view class="content_table">
- <view class="item">
- <view class="lable rx-cc">序号</view>
- <view class="content">{{ idx + 1 }}</view>
- </view>
- <view class="item">
- <view class="lable rx-cc">包装编码</view>
- <view class="content">{{ ite.packageNo }}</view>
- </view>
- <view class="item">
- <view class="lable rx-cc">包装数量({{ ite.packingUnit }})</view>
- <view class="content">{{ ite.packingQuantity }}</view>
- </view>
- <view class="item">
- <view class="lable rx-cc">计量数量({{ ite.measureUnit }})</view>
- <view class="content">{{ ite.measureQuantity }}</view>
- </view>
- <view class="item">
- <view class="lable rx-cc">物料代号</view>
- <view class="content">{{ ite.materielDesignation }}</view>
- </view>
- <view class="item">
- <view class="lable rx-cc">客户代号</view>
- <view class="content">{{ ite.clientCode }}</view>
- </view>
- <view class="item">
- <view class="lable rx-cc">刻码</view>
- <view class="content">{{ ite.engrave }}</view>
- </view>
- <view class="item">
- <view class="lable rx-cc">重量({{ ite.weightUnit }})</view>
- <view class="content">
- {{ ite.weight }}
- </view>
- </view>
- <view class="item">
- <view class="lable rx-cc">质检状态</view>
- <view class="content">
- {{ qualityResults[ite.status] }}
- </view>
- </view>
- <view class="item">
- <view class="lable rx-cc">采购日期</view>
- <view class="content">
- {{ ite.purchaseDate }}
- </view>
- </view>
- <view class="item">
- <view class="lable rx-cc">生产日期</view>
- <view class="content">
- {{ ite.productionDate }}
- </view>
- </view>
- </view>
- </view>
- </u-list>
- </view>
- </view>
- </u-form>
- </uni-collapse-item>
- </uni-collapse>
- </view>
- </template>
- <script>
- // import ScanCode from '@/components/ScanCode.vue'
- import { getInboundDetailsById, getTreeByGroup } from '@/api/warehouseManagement'
- import { getByCode } from '@/api/pda/common'
- import dayjs from 'dayjs'
- import { sceneState } from '../common'
- import { post, postJ, get, getJ } from '@/utils/api.js'
- import WarehouseChoose from '@/components/WarehouseChoose'
- import { warehousingType, inputStatus, emergencyState, warehousingMaterialListTable, getDictName, materialType } from '../enum.js'
- import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
- // import addDetails from '@/components/addDetails'
- import UploadFileNew from '@/components/UploadFileNew'
- // import { getRuleNo } from '@/utils/utils.js'
- // import dictMixins from '@/mixins/dictMixins.js'
- export default {
- components: {
- WarehouseChoose,
- baTreePicker,
- UploadFileNew
- },
- // mixins: [dictMixins],
- data() {
- return {
- statusLabelList: ['未提交', '审核中', '审核通过', '已驳回'],
- goodsLists: [], // 物品类型
- assetTypeName: '', // 物品类型名称
- timeShow: false,
- packingSpecificationOption: [], // 包装规格
- currentPackingSpecificationOption: [], // 当前包装规格
- currentSupplierListOption: [], // 当前供货商
- warehouseListOption: [], // 仓库列表
- currentTypeTime: Number(new Date()), // 当前时间类型的时间
- storageTime: '', // 入库时间
- currentProductIndex: null, // 当前产品索引
- currentPackingIndex: null, // 当前包装索引
- packingUnitsShow: false,
- typeTimeShow: false,
- suppliersShow: false,
- warehouseShow: false,
- timeTypeShow: false,
- statusShow: false,
- dictCodeList: [], // 字典列表
- curDateType: 'purchaseDate',
- qualityResultsOption: [
- [
- {
- label: '合格',
- value: 1
- },
- {
- label: '不合格',
- value: 2
- }
- ]
- ], // 质检状态 0未检 1已检
- qualityResults: {
- 1: '合格',
- 2: '不合格'
- }, // 质检结果 1合格 2不合格
- curDateTypeLabel: {
- purchaseDate: '采购日期',
- productionDate: '生产日期'
- },
- timeTypeOption: [
- [
- {
- name: '采购日期',
- prop: 'purchaseDate'
- },
- {
- name: '生产日期',
- prop: 'productionDate'
- }
- ]
- ], // 时间类型
- collapseOpen: 'collapse1',
- emergencyState,
- warehousingType,
- materialType,
- sceneState,
- inputStatus,
- getDictName,
- detailOpen: false,
- codeOpen: false,
- deptList: [], //部门
- supplierList: [], //供应商
- formData: {
- type: 1, // 入库
- bizType: '1', // 入库场景
- storageTime: '', // 入库时间
- extInfo: {}, // 扩展信息
- sourceBizNo: '', // 来源单据编号
- fromUser: '', // 送货人
- remark: '' // 备注
- },
- statusList: [
- {
- id: 1,
- name: '紧急'
- },
- {
- id: 2,
- name: '中等'
- },
- {
- id: 1,
- name: '普通'
- }
- ], //紧急状态
- pickerIndex: 0,
- productList: [],
- userList: [],
- rules: {
- assetType: {
- type: 'number',
- required: true,
- message: '请选择入库产品类型',
- trigger: ['blur', 'change']
- },
- bizType: {
- type: 'number',
- required: true,
- message: '请选择入库场景',
- trigger: ['blur', 'change']
- }
- // contentImage: {
- // type: 'array',
- // required: true,
- // message: '请上传附件',
- // trigger: ['blur', 'change']
- // }
- },
- settingIndex: 0
- }
- },
- onShow() {
- this.collapseOpen = 'collapse1'
- },
- onLoad(options) {
- this.getListItems() // 物品类型
- getInboundDetailsById(options.id).then(res => {
- console.log(res)
- this.productList = res.outInDetailList.map(item => {
- return {
- ...item,
- packingSpecificationLabel: item.extField.packingSpecification ? item.extField.packingSpecification.split(',') : [],
- isSave: true
- }
- })
- this.formData = res
- })
- },
- computed: {
- listRules() {
- return this.productList.reduce((cur, pre, index) => {
- return {
- ...cur,
- [`productList.${index}.batchNo`]: {
- type: 'string',
- required: true,
- trigger: ['blur', 'change']
- },
- [`productList.${index}.packingQuantity`]: {
- type: 'number',
- required: true,
- trigger: ['blur', 'change']
- },
- [`productList.${index}.packingUnit`]: {
- type: 'string',
- required: true,
- trigger: ['blur', 'change']
- },
- [`productList.${index}.warehouseId`]: {
- type: 'string',
- required: true,
- trigger: ['blur', 'change']
- }
- }
- }, {})
- }
- },
- methods: {
- getGoodsListsLabel(assetType) {
- let arr = assetType ? assetType.split(',') : []
- let label = arr.reduce((pre, cur) => {
- console.log(cur)
- console.log(pre)
- return (pre ? pre + '/' : '') + this.goodsLists.find(item => item.id == cur).name
- }, '')
- return label
- },
- formatter(dataTime) {
- return dayjs(dataTime).format('YYYY-MM-DD HH:mm:ss')
- },
- // 获取物品列表
- getListItems() {
- getTreeByGroup({ type: 2 }).then(res => {
- this.goodsLists = res
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .mainBox {
- /deep/.required-form .u-form-item__body__left__content__label::before {
- content: '*';
- color: red;
- }
- }
- .required-form-text {
- /deep/ .u-form-item__body__right {
- overflow: hidden;
- .u-form-item__body__right__content {
- width: 100%;
- display: inline-block !important;
- width: 100%;
- }
- }
- }
- .picList {
- display: flex;
- align-items: center;
- justify-items: flex-start;
- flex-wrap: wrap;
- }
- /deep/.baseForm {
- .u-form-item__body {
- padding: 0px !important;
- }
- .assetType_box {
- padding: 12rpx 18rpx;
- height: 60rpx;
- box-sizing: border-box;
- width: 100%;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- /deep/.picList .u-image {
- margin-right: 10rpx;
- margin-bottom: 10rpx;
- }
- /deep/.cLine .u-line:nth-child(1) {
- border-bottom: none !important;
- }
- .detail-box {
- position: relative;
- display: flex;
- justify-content: space-between;
- align-items: center;
- /deep/uni-button {
- margin: 0 !important;
- width: 180rpx;
- }
- .selectEnterType {
- margin-left: 10rpx !important;
- }
- }
- .footBox {
- position: fixed;
- left: 0px;
- bottom: 0px;
- height: 100rpx;
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- view {
- width: 100%;
- height: 100%;
- text-align: center;
- color: #fff;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .reg {
- background: $u-success-dark;
- }
- .add {
- background: $uni-color-primary;
- }
- .uni-icons {
- margin-right: 8rpx !important;
- }
- }
- .listBox {
- padding: 20rpx 10rpx;
- border-bottom: 1px #f2f2f2 solid;
- position: relative;
- &.code {
- .label {
- width: 120rpx !important;
- }
- }
- .listTit {
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- /deep/uni-button {
- margin-right: 20rpx;
- width: 100rpx;
- &.assets {
- width: 180rpx;
- }
- }
- .name {
- width: 50%;
- margin-left: 10px;
- overflow: hidden;
- white-space: nowrap;
- -o-text-overflow: ellipsis;
- text-overflow: ellipsis;
- font-size: 30rpx;
- }
- .btn {
- display: flex;
- justify-content: flex-end;
- }
- .weight {
- width: 30%;
- font-size: 30rpx;
- margin-left: auto;
- margin-right: 60rpx;
- position: relative;
- display: flex;
- input {
- margin-right: 10rpx;
- border: 1px solid black;
- width: 40%;
- height: 20rpx;
- }
- }
- .weight::after {
- position: absolute;
- right: -30rpx;
- top: 50%;
- content: '';
- background: #eee;
- width: 1px;
- height: 28rpx;
- margin-top: -14rpx;
- }
- }
- .z_list {
- max-height: 500rpx;
- .material {
- margin-top: 10rpx;
- .left {
- width: 40rpx;
- }
- .zdy_check {
- width: 30rpx;
- height: 30rpx;
- border: 2rpx solid #c8c9cc;
- border-radius: 4rpx;
- }
- .check_active {
- background: $theme-color;
- border: 2rpx solid $theme-color;
- /deep/ .u-icon__icon {
- color: #fff !important;
- }
- }
- .content_table {
- width: 100%;
- border: 2rpx solid $border-color;
- .item {
- display: flex;
- border-bottom: 2rpx solid $border-color;
- .lable {
- width: 200rpx;
- text-align: center;
- background-color: #f7f9fa;
- font-size: 26rpx;
- border-right: 2rpx solid $border-color;
- flex-shrink: 0;
- }
- .ww80 {
- width: 80rpx;
- }
- .content {
- width: 500rpx;
- min-height: 64rpx;
- font-size: 28rpx;
- line-height: 28rpx;
- font-style: normal;
- font-weight: 400;
- padding: 18rpx 8rpx;
- box-sizing: border-box;
- word-wrap: break-word;
- flex-grow: 1 !important;
- }
- .input_box {
- padding: 0 !important;
- }
- .content_num {
- display: flex;
- align-items: center;
- padding: 0 4rpx;
- /deep/ .uni-input-input {
- width: 200rpx;
- border: 2rpx solid #f0f8f2;
- background: #f0f8f2;
- color: $theme-color;
- }
- .unit {
- padding: 0 4rpx;
- font-size: 24rpx;
- color: #404446;
- }
- }
- .ww400 {
- /deep/ .uni-input-input {
- width: 400rpx;
- }
- }
- .pd4 {
- padding: 4rpx 8rpx;
- }
- &:last-child {
- border-bottom: none;
- }
- }
- .ww55 {
- width: 55%;
- }
- .ww45 {
- width: 45%;
- }
- .ww50 {
- width: 50%;
- }
- .ww30 {
- width: 30%;
- }
- .ww70 {
- width: 70%;
- }
- .ww80 {
- width: 80%;
- }
- .ww20 {
- width: 20%;
- }
- .check {
- width: 30rpx;
- height: 30rpx;
- }
- .tag_box {
- padding: 2rpx 10rpx;
- margin-right: 12rpx;
- background: #e6a23c;
- font-size: 22rpx;
- color: #fff;
- border-radius: 4rpx;
- }
- }
- }
- }
- .more {
- position: absolute;
- bottom: 26rpx;
- right: 30rpx;
- font-size: 28rpx;
- color: #666;
- }
- }
- .listCont {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- margin-top: 20rpx;
- margin-left: 10rpx;
- &.save {
- .u-input {
- border: none;
- }
- }
- .u-input {
- border: 1px solid rgb(229, 229, 229);
- height: 15rpx !important;
- }
- .item {
- width: 47%;
- font-size: 28rpx;
- margin-bottom: 10rpx;
- margin-right: 3%;
- // line-height: 45rpx;
- // overflow: hidden;
- // white-space: nowrap;
- // text-overflow: ellipsis;
- // -o-text-overflow: ellipsis;
- // color: #000;
- // display: flex;
- /deep/.u-form-item__body {
- padding: 0 !important;
- }
- /deep/.u-input__content__field-wrapper__field,
- /deep/.u-form-item {
- font-size: 28rpx !important;
- }
- text.label {
- width: 120rpx;
- display: inline-block;
- text-align: right;
- margin-right: 20rpx;
- margin-bottom: 20rpx;
- }
- /deep/.uni-date__x-input {
- height: 40rpx;
- font-size: 28rpx;
- }
- /deep/.uni-date {
- width: 48%;
- display: inline-block;
- .uni-icons {
- display: none !important;
- }
- .uni-date-x {
- padding: 0 !important;
- }
- }
- }
- .item text {
- color: #666;
- }
- }
- .selectTime {
- display: flex;
- justify-content: flex-end;
- margin-bottom: 10rpx;
- .timeBox {
- display: flex;
- width: 500rpx;
- .firstBtn {
- margin-right: 10rpx;
- }
- }
- }
- .listBox:last-child {
- border: none !important;
- }
- .textBox {
- border: 1px #f2f2f2 solid;
- height: 160px;
- display: block;
- width: auto !important;
- }
- .saveBtn {
- width: 50%;
- margin: 40rpx auto;
- }
- .top-css {
- border-bottom: 1px solid rgb(207, 204, 204);
- }
- </style>
|