| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266 |
- <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="240" labelAlign="right"
- class="baseForm">
- <u-form-item label="物品类型" class="required-form" borderBottom prop="assetTypeName">
- <view :style="{ color: assetTypeName ? 'black' : '#c0c4cc' }" class="assetType_box" @click="openPicker">
- {{ assetTypeName ? assetTypeName : '请选择产品类型' }}
- </view>
- </u-form-item>
- <u-form-item label="来源单据" prop="documentSource" borderBottom>
- <u-input type="text" placeholder="请输入" v-model="formData.sourceBizNo" @click.native="goToRequisition" />
- </u-form-item>
- <u-form-item label="入库类型" class="required-form" prop="bizType" borderBottom>
- <uni-data-select v-model="formData.bizType" :localdata="sceneState"
- @change="changeType"></uni-data-select>
- <!-- <picker :disabled="!!(productList && productList.length)"
- @change="handlePicker(e, sceneState, 'bizType')" :value="pickerIndex" :range="sceneState"
- range-key="text">
- <u-input :value="sceneStateFilter(formData.bizType)"
- :disableColor="!!(productList && productList.length) ? '#F5F7FA' : '#fff'" placeholder="请选择"
- disabled type="select" />
- </picker> -->
- <!-- <u-icon slot="right" name="arrow-right"></u-icon> -->
- </u-form-item>
- <u-form-item label="入库时间" prop="storageTime" borderBottom>
- <view class="assetType_box" @click="timeShow = true">{{ storageTime ? formatter(storageTime) : '请选择' }}
- </view>
- </u-form-item>
- <u-form-item label="入库登记人" prop="createUserName" borderBottom>
- <u-input disableColor="#ffffff" :value="formData.extInfo.createUserName" placeholder="请选择" disabled
- type="text" />
- </u-form-item>
- <!-- <u-form-item label="送货人" prop="deliveryName" borderBottom>
- <u-input type="text" placeholder="请输入" v-model="formData.fromUser" />
- </u-form-item>
- <u-form-item label="送货人联系方式" prop="deliveryPhone" borderBottom>
- <u-input type="text" placeholder="请输入" v-model="formData.extInfo.deliveryPhone" />
- </u-form-item> -->
- <u-form-item label="备注" prop="remark" borderBottom>
- <u-input disableColor="#ffffff" v-model="formData.remark" placeholder="请输入内容" type="text" />
- </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 flex_between">
- <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="goToScanCodeList"></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="160"
- :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 flex_between">
- <view class="name">{{ item.categoryName }}</view>
- <view class="btn">
- <u-button v-if="item.isSave" type="primary" size="small" :hairline="true" text="编辑"
- @click="listEdit(index)"></u-button>
- <u-button v-else type="primary" size="small" :hairline="true" text="保存"
- @click="listSave(item, index)"></u-button>
- <u-button type="error" size="small" :hairline="true" text="删除"
- @click="getDelete(index)"></u-button>
- </view>
- </view>
- <view class="listCont" :class="{ save: item.isSave }">
- <view class="item w100">
- <u-form-item :label="`物品编码`">
- {{ item.categoryCode }}
- </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`"
- class="required-form">
- <!-- <u--input :disabled="item.isSave" placeholder="请输入" border="surround"
- v-model="item.batchNo"></u--input> -->
- <u-input :disabled="item.isSave" placeholder="请输入" style="height: 30px;"
- v-model="item.batchNo" />
- </u-form-item>
- </view>
- <view class="item">
- <u-form-item label="数量" :prop="`productList.${index}.packingQuantity`"
- class="aa required-form">
- <u--input :disabled="item.isSave" placeholder="请输入" border="surround"
- v-model="item.packingQuantity"
- @change="computeNum(item, index, true)"></u--input>
- </u-form-item>
- </view>
- <view class="item">
- <u-form-item label="包装单位" :prop="`productList.${index}.packingUnit`"
- class="dd required-form">
- <!-- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
- v-model="item.packingUnit"
- @click.native="showPackingUnitPicker(item, index)"></u--input> -->
- <view
- :style="{ color: item.packingUnit ? 'black' : '#c0c4cc',marginLeft:'9px' }"
- class="assetType_box" :disabled="item.isSave"
- @click="showPackingUnitPicker(item, index)">
- {{ item.packingUnit ? item.packingUnit : '请选择' }}
- </view>
- </u-form-item>
- </view>
- <view class="item">
- <u-form-item label="仓库" :prop="`productList.${index}.warehouseName`"
- class="dd required-form">
- <!-- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
- v-model="item.warehouseName"
- @click.native="showWarehousePicker(index)"></u--input> -->
- <view
- :style="{ color: item.warehouseName ? 'black' : '#c0c4cc',marginLeft:'9px' }"
- class="assetType_box" :disabled="item.isSave"
- @click="showWarehousePicker( index)">
- {{ item.warehouseName ? item.warehouseName : '请选择' }}
- </view>
- </u-form-item>
- </view>
- <view class="item w100">
- <u-form-item label="供应商" :prop="`productList.${index}.supplierName`" class="dd">
- <!-- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
- v-model="item.supplierName"
- @click.native="showSupplierPicker(item, index)"></u--input> -->
- <view
- :style="{ color: item.supplierName ? 'black' : '#c0c4cc',marginLeft:'9px' }"
- class="assetType_box" :disabled="item.isSave"
- @click="showSupplierPicker(item, index)">
- {{ item.supplierName ? item.supplierName : '请选择' }}
- </view>
- </u-form-item>
- </view>
- <view class="flex_between w100">
- <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>
- <view class="flex_between w100">
- <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>
- <view class="item">
- <u-form-item label="是否拆包"
- prop="isUnpack">{{ item.isUnpack ? '是' : '否' }}</u-form-item>
- </view>
- </view>
- <view class="selectTime" v-if="item.outInDetailRecordRequestList.length > 0">
- <view class="title">包装列表</view>
- <view class="timeBox">
- <u-button class="firstBtn" size="small" type="primary" text="选择时间类型"
- @click="timeTypeShow = true"></u-button>
- <u-button type="warning" size="small"
- :text="`批量设置${curDateType?curDateTypeLabel[curDateType]:''}`"
- @click="typeTimeClick(index)"></u-button>
- </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="left rx-ss" @click="deletePacking(index, idx)">
- <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
- </view> -->
- <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 input_box"><u--input clearable placeholder="请输入"
- border="surround" v-model="ite.materielDesignation"></u--input>
- </view>
- </view>
- <view class="item">
- <view class="lable rx-cc">客户代号</view>
- <view class="content input_box"><u--input clearable placeholder="请输入"
- border="surround" v-model="ite.clientCode"></u--input></view>
- </view>
- <view class="item">
- <view class="lable rx-cc">刻码</view>
- <view class="content input_box"><u--input clearable placeholder="请输入"
- border="surround" v-model="ite.engrave"></u--input></view>
- </view>
- <view class="item">
- <view class="lable rx-cc">重量({{ ite.weightUnit }})</view>
- <view class="content input_box">
- <u--input clearable placeholder="请输入" border="surround"
- v-model="ite.weight"
- @change="weightInput($event, ite, index)"></u--input>
- </view>
- </view>
- <view class="item">
- <view class="lable rx-cc">质检状态</view>
- <view class="content" @click="statusClick(index, idx)">
- {{ qualityResults[ite.status] }}
- </view>
- </view>
- <view class="item">
- <view class="lable rx-cc">{{ curDateTypeLabel[curDateType] }}</view>
- <view class="content input_box">
- <u--input clearable placeholder="请选择" border="surround"
- v-model="ite[curDateType]"
- @click.native="typeTimeClick(index, idx)"></u--input>
- </view>
- </view>
- </view>
- </view>
- </u-list>
- </view>
- </view>
- </u-form>
- </uni-collapse-item>
- </uni-collapse>
- <view class="footBox">
- <view class="reg" @click="submit">
- <uni-icons custom-prefix="iconfont" size="20" color="#fff"></uni-icons>
- 提交
- </view>
- </view>
- <!-- 选择物品类型 -->
- <ba-tree-picker ref="treePicker" :multiple="true" @select-change="confirm" title="选择物品类型"
- :localdata="goodsLists" valueKey="id" textKey="name" childrenKey="child" />
- <!-- 选择入库时间 -->
- <u-datetime-picker @confirm="timeConfirm" @cancel="timeCancel" :show="timeShow" v-model="storageTime"
- mode="datetime"></u-datetime-picker>
- <!-- 选择包装单位 -->
- <u-picker :show="packingUnitsShow" visibleItemCount="10" :columns="currentPackingSpecificationOption"
- keyName="conversionUnit" @confirm="selectPackingUnitInfo" @cancel="packingUnitsShow = false"
- title="选择包装单位"></u-picker>
- <!-- 选择供应商单位 -->
- <u-picker :show="suppliersShow" visibleItemCount="10" :columns="currentSupplierListOption" keyName="name"
- @confirm="selectSuppliersInfo" @cancel="suppliersShow = false" title="选择供应商"></u-picker>
- <!-- 选择仓库 -->
- <u-picker :show="warehouseShow" visibleItemCount="10" :columns="warehouseListOption" keyName="name"
- @confirm="selectWarehouseInfo" @cancel="warehouseShow = false" title="选择仓库"></u-picker>
- <!-- 选择时间类型 -->
- <u-picker :show="timeTypeShow" visibleItemCount="10" :columns="timeTypeOption" keyName="name"
- @confirm="selectTimeTypeInfo" @cancel="timeTypeShow = false" title="选择时间类型"></u-picker>
- <!-- 选择生产/采购日期 -->
- <u-datetime-picker @confirm="typeTimeConfirm" @cancel="typeTimeShow = false" :show="typeTimeShow"
- v-model="currentTypeTime" mode="datetime"></u-datetime-picker>
- <!-- 选择质检状态 -->
- <u-picker :show="statusShow" visibleItemCount="10" :columns="qualityResultsOption" keyName="label"
- @confirm="selectStautsInfo" @cancel="statusShow = false" title="选择质检状态"></u-picker>
- </view>
- </template>
- <script>
- // import ScanCode from '@/components/ScanCode.vue'
- import {
- getTreeByGroup,
- contactQueryByCategoryIdsAPI,
- getCode,
- getCategoryPackageDisposition,
- getWarehouseList,
- getAssetNum,
- storage,
- qualityInspectionTwo,
- submitTwo
- } 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 {
- tableHeader
- } from '../common'
- // import dictMixins from '@/mixins/dictMixins.js'
- export default {
- components: {
- WarehouseChoose,
- baTreePicker,
- UploadFileNew
- },
- // mixins: [dictMixins],
- data() {
- return {
- 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: '', // 入库场景
- 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() {
- // const _this = this
- // uni.$off('scancode') // 每次进来先 移除全局自定义事件监听器
- // uni.$on('scancode', function (data) {
- // uni.navigateBack({
- // delta: 1
- // })
- // _this.qrContent = data.code.trim()
- // _this.handleScan()
- // })
- this.collapseOpen = 'collapse1'
- },
- beforeDestroy() {
- uni.$off('setSelectList')
- uni.$off('requisitionSelect')
- },
- async onLoad(options) {
- await this.getListItems() // 物品类型
- await this.getwarehouseList() // 仓库列表
- await this.requireDictCode() // 字典列表
- // this.requestDict('物品类型')
- // this.getDept()
- // this.getSupplier()
- const userInfo = uni.getStorageSync('userInfo')
- console.log()
- this.formData.extInfo.createUserName = userInfo.name
- this.formData.createUserId = userInfo.name
- this.storageTime = Number(new Date())
- this.formData.storageTime = this.formatter(this.storageTime)
- // this.formData.registerId = userInfo.id
- uni.$on('setSelectList', async data => {
- if (data?.length) {
- this.formData.sourceBizNo = ''
- // 获取批次号
- const batchNo = await getCode('lot_number_code')
- // 获取供应商
- const supplierList = await contactQueryByCategoryIdsAPI({
- categoryIds: data.map(item => item.id)
- })
- // 获取包装规格
- let packingSpecification = await getCategoryPackageDisposition({
- categoryIds: data.map(item => item.id)
- })
- this.packingSpecificationOption = data.map(item => {
- return packingSpecification.filter(ite => item.id == ite.categoryId).sort((
- a, b) => a.sort - b.sort)
- })
- let productList = data.map((item, index) => {
- // 显示规格
- let packingSpecificationLabel = this.packingSpecificationOption[index]
- .map(item => {
- if (item.sort > 0) {
- return `${item.packageCell}${item.packageUnit}/${item.conversionUnit}`
- }
- })
- .filter(item => !!item)
- return {
- index: this.productList.length - 1 > -1 ? this.productList[this
- .productList.length - 1].index + index + 1 : this.productList
- .length + index,
- categoryId: item.id, // 物品id
- categoryName: item.name, // 物品名称
- categoryCode: item.code, // 物品编码
- categoryModel: item.modelType, // 物品型号
- specification: item.specification, // 规格
- brandNum: item.brandNum, // 牌号
- batchNo: batchNo, // 批次号
- supplierListOptions: supplierList[item.id], // 供应商列表
- supplierId: '', // 供应商id
- supplierName: '', // 供应商名称
- approvalNumber: item.approvalNumber, // 批准文号
- packingSpecification: item.packingSpecification, // 包装规格
- packingSpecificationOption: this.packingSpecificationOption[
- index], // 包装规格选项
- packingSpecificationLabel: packingSpecificationLabel, // 包装规格显示
- minPackingQuantity: '', // 最小包装单元数量
- packingQuantity: '', // 包装数量
- packingUnit: '', // 包装单位
- measureQuantity: 0, // 计量数量
- measureUnit: item.measuringUnit, // 计量单位
- netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
- weight: 0, // 重量
- weightUnit: item.weightUnit, // 重量单位
- totalMoney: '', // 总价
- price: item.price, // 单价
- purpose: '', // 用途
- isUnpack: item.isUnpack, // 是否允许拆包
- outInDetailRecordRequestList: []
- }
- })
- this.productList = this.productList.concat(productList)
- console.log(this.productList, '------------------this.productList----111-----')
- setTimeout(() => {
- this.detailOpen = !this.detailOpen
- this.$refs.collapse && this.$refs.collapse.resize()
- }, 0)
- }
- })
- uni.$on('requisitionSelect', async (data, query) => {
- console.log(data)
- this.formData.sourceBizNo = query.sourceBizNo
- this.formData.bizType = parseInt(query.bizType)
- this.formData.extInfo.assetType = query.assetType.split(',')
- let filterArray = this.formData.extInfo.assetType.map(item => {
- return this.goodsLists.find(ite => ite.id == item).name
- })
- this.assetTypeName = Array.from(new Set(filterArray)).join('/')
- const batchNo = await getCode('lot_number_code')
- // 获取包装规格
- let packingSpecification = await getCategoryPackageDisposition({
- categoryIds: data.map(item => item.categoryId)
- })
- this.packingSpecificationOption = data.map(item => {
- return packingSpecification.filter(ite => item.categoryId == ite.categoryId)
- .sort((a, b) => a.sort - b.sort)
- })
- this.productList = data.map((productItem, productIndex) => {
- // 显示规格
- let packingSpecificationLabel = this.packingSpecificationOption[productIndex]
- .map(item => {
- if (item.sort > 0) {
- return `${item.packageCell}${item.packageUnit}/${item.conversionUnit}`
- }
- })
- .filter(item => !!item)
- return {
- ...productItem,
- index: this.productList.length + productIndex,
- isSave: productItem.outInDetailRecordRequestList?.length > 0 ? true :
- false,
- batchNo: batchNo, // 批次号
- warehouseIds: [productItem.warehouseId], // 仓库Id
- warehouseNames: [productItem.warehouseName], // 仓库名称
- packingSpecificationOption: this.packingSpecificationOption[
- productIndex], // 包装规格选项
- packingSpecificationLabel: packingSpecificationLabel, // 包装规格显示
- outInDetailRecordRequestList: productItem.outInDetailRecordRequestList
- ?.length > 0 ?
- productItem.outInDetailRecordRequestList.map((packingItem,
- packingIndex) => {
- return {
- ...packingItem,
- index: this.productList.length + productIndex + '-' +
- packingIndex, // 包装索引
- batchNo: batchNo, // 批次号
- parentIndex: this.productList.length +
- productIndex, // 物品索引
- categoryName: productItem.categoryName,
- categoryCode: productItem.categoryCode,
- materialDetailList: packingItem.materialDetailList.map((
- materialItem, materialIndex) => {
- return {
- ...materialItem,
- index: this.productList.length +
- productIndex + '-' + packingIndex +
- '——' + materialIndex, // 包装索引
- parentIndex: this.productList.length +
- productIndex + '-' +
- packingIndex, // 物品索引
- batchNo: batchNo, // 批次号
- categoryName: productItem.categoryName,
- categoryCode: productItem.categoryCode
- }
- })
- }
- }) : []
- }
- })
- setTimeout(() => {
- this.detailOpen = !this.detailOpen
- this.$refs.collapse && this.$refs.collapse.resize()
- }, 0)
- })
- // 明细信息填写
- uni.$on('batchNumBack', productList => {
- if (productList?.length) {
- this.productList = productList
- }
- })
- },
- mounted() {
- // this.getAddDetails();
- },
- computed: {
- tableHeader() {
- return tableHeader(this.formData.assetType)
- },
- materialCodeReqList() {
- return this.productList.map(i => i.warehouseLedgerDetails || []).flat()
- },
- isMaterial() {
- return this.formData.assetType == 3
- },
- warehousingName() {
- return []
- this.productList = []
- return this.getDictValue('物品类型', this.formData.assetType)
- },
- 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: {
- goToScanCodeList() {
- uni.navigateTo({
- url: '/pages/warehouse/enterHouse/components/scanCodeList'
- })
- },
- goToRequisition() {
- uni.navigateTo({
- url: '/pages/warehouse/components/requisitionList?type=' + 1
- })
- },
- // 入库
- submit() {
- if (this.productList.length <= 0) {
- uni.showToast({
- icon: 'none',
- title: '请添加产品!'
- })
- return
- }
- let boolen = this.productList.every(item => item.isSave)
- if (!boolen) {
- uni.showToast({
- icon: 'none',
- title: '请先保存所有产品信息!'
- })
- return
- }
- uni.showLoading({
- title: '保存中...'
- })
- this.formData.outInDetailList = this.productList
- let obj = uni.$u.deepClone(this.formData)
- // 处理物品类型assetType
- obj.extInfo.assetType = obj.extInfo.assetType?.join(',')
- // 处理仓库id
- let warehouseId = []
- let warehouseName = []
- let warehouseIds = this.productList.map(item => item.warehouseIds).flat()
- let warehouseNames = this.productList.map(item => item.warehouseNames).flat()
- warehouseIds.forEach((item, index) => {
- if (!warehouseId.includes(item)) {
- warehouseId.push(item)
- warehouseName.push(warehouseNames[index])
- }
- })
- obj.warehouseIds = warehouseId
- obj.warehouseNames = warehouseName
- // 是否需要审核(0审核 1跳过审核)
- if (obj.bizType == '12') {
- obj.isSkip = 1
- } else {
- obj.isSkip = 0
- }
- // obj.isSkip = 1;
- console.log(obj, '提交')
- storage(obj)
- .then(async res => {
- console.log('入库成功', res)
- if (res.code == 0) {
- try {
- // 委外入库(非采购)
- if (obj.bizType == '12') {
- await qualityInspectionTwo({
- outInId: res.data[0]
- })
- } else {
- await submitTwo({
- outInId: res.data[0]
- })
- }
- uni.hideLoading()
- uni.showToast({
- icon: 'none',
- title: '入库成功',
- duration: 1500
- })
- uni.navigateBack({
- delta: 1
- })
- } catch (error) {
- uni.hideLoading()
- console.log('提交流程失败', error)
- }
- }
- })
- .catch(err => {
- console.log('入库失败', err)
- uni.hideLoading()
- uni.showToast({
- icon: 'none',
- title: '入库失败',
- duration: 2000
- })
- })
- },
- // 重量限制
- weightInput(value, row, productIndex) {
- const newValue = value.replace(/[^\d.]/g, '') // 保留数字和小数点
- const decimalCount = (newValue.match(/\./g) || []).length // 计算小数点的个数
- if (row.weight < 0) {
- row.weight = 0
- } else if (row.weight > 9999) {
- row.weight = 9999
- } else {
- if (decimalCount > 1) {
- // 如果小数点个数大于1,移除多余的小数点
- const lastIndex = newValue.lastIndexOf('.')
- row.weight = newValue.slice(0, lastIndex) + newValue.slice(lastIndex + 1)
- } else if (decimalCount === 1) {
- // 如果小数点个数等于1,允许小数点的输入
- row.weight = newValue
- } else {
- row.weight = newValue === '' ? 0 : parseFloat(newValue) // 如果输入为空,则设为0
- }
- }
- this.packingWeightCahnge(productIndex)
- },
- // 包装重量修改
- packingWeightCahnge(productIndex) {
- // 修改物品重量
- let totalWeight = this.productList[productIndex].outInDetailRecordRequestList.reduce((accumulator,
- currentValue) => {
- return Number(accumulator) + Number(currentValue.weight)
- }, 0)
- this.$set(this.productList[productIndex], 'weight', totalWeight)
- },
- scrolltolower() {
- console.log('滑动了~~~')
- },
- typeTimeClick(index, idx) {
- console.log('index-----', index)
- console.log('idx----', idx)
- this.currentProductIndex = index
- this.currentPackingIndex = idx > -1 ? idx : -1
- this.typeTimeShow = true
- },
- statusClick(index, idx) {
- this.currentProductIndex = index
- this.currentPackingIndex = idx > -1 ? idx : -1
- this.statusShow = true
- },
- selectStautsInfo(e) {
- this.productList[this.currentProductIndex].outInDetailRecordRequestList[this.currentPackingIndex].status =
- e.value[0]?.value
- this.statusShow = false
- },
- typeTimeConfirm() {
- this.typeTimeShow = false
- this.$nextTick(() => {
- console.log(this.currentPackingIndex)
- if (this.currentPackingIndex > -1) {
- // 单独
- this.productList[this.currentProductIndex].outInDetailRecordRequestList[this
- .currentPackingIndex][this.curDateType] = this.formatter(this.currentTypeTime)
- } else {
- // 批量
- this.productList[this.currentProductIndex].outInDetailRecordRequestList = this.productList[
- this.currentProductIndex].outInDetailRecordRequestList.map(item => {
- console.log(this.currentTypeTime)
- console.log(this.formatter(this.currentTypeTime))
- return {
- ...item,
- [this.curDateType]: this.formatter(this.currentTypeTime)
- }
- })
- }
- })
- },
- // 物品保存验证表单(单独)
- validateFormIndividually(index) {
- return new Promise(async resolve => {
- console.log('index----------------', index)
- let fileds = [`productList.${index}.batchNo`, `productList.${index}.packingQuantity`,
- `productList.${index}.packingUnit`, `productList.${index}.warehouseId`
- ]
- Promise.all(
- fileds.map(
- item =>
- new Promise(async (res, rej) => {
- this.$refs.lisrFormRef.validateField(item, err => {
- console.log('err--', err)
- if (err?.length) {
- rej(err)
- } else {
- res(true)
- }
- })
- })
- )
- )
- .then(() => {
- resolve()
- })
- .catch(err => {
- uni.showToast({
- icon: 'none',
- title: '请填入必填项!'
- })
- })
- })
- },
- // 产品编辑
- listEdit(index) {
- this.currentProductIndex = index
- this.productList[index].isSave = false
- this.productList[index].outInDetailRecordRequestList = []
- },
- listSave(row, index) {
- console.log('index------', index)
- this.validateFormIndividually(index).then(async () => {
- console.log('通过了!!!')
- // 判断包装单位和计量单位是否为不拆物料层规格
- let packingBoolen = !!this.getDict(row.packingUnit).dictValue
- let measureBoolen = !!this.getDict(row.measureUnit).dictValue
- let packingNum = 0
- // 处理包装单位为KG类的情况
- if (packingBoolen) {
- let filterArr = row.packingSpecificationOption.filter(item => {
- return item.packageUnit == row.packingUnit && item.packageUnit != item
- .conversionUnit
- })
- packingNum = Math.ceil(row.packingQuantity / filterArr[0].packageCell)
- }
- // 处理包装单位不为KG类,计量单位为KG类的情况
- let measureNum = row.packingQuantity
- if (measureBoolen) {
- let splitIndex = row.packingSpecificationOption.findIndex(item => item
- .conversionUnit == row.packingUnit && item.packageUnit != item.conversionUnit)
- for (; splitIndex > 1; splitIndex--) {
- measureNum = measureNum * row.packingSpecificationOption[splitIndex].packageCell
- }
- }
- // 获取包装编码列表
- const {
- data
- } = await getAssetNum([{
- assetCode: row.categoryCode + row.index,
- batchNum: row.batchNo,
- num: packingBoolen ? packingNum : row.isUnpack ? (measureBoolen ?
- measureNum : row.measureQuantity) : row.packingQuantity
- }])
- this.generateWrappers(row, index, data)
- this.$set(this.productList[index], 'isSave', true)
- })
- },
- // 获取当前时间函数
- getNowDate() {
- let date = new Date(),
- obj = {
- year: date.getFullYear(), //获取完整的年份(4位)
- month: date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
- strDate: date.getDate(), // 获取当前日(1-31)
- hour: date.getHours(), //获取当前小时(0 ~ 23)
- minute: date.getMinutes(), //获取当前分钟(0 ~ 59)
- second: date.getSeconds() //获取当前秒数(0 ~ 59)
- }
- Object.keys(obj).forEach(key => {
- if (obj[key] < 10) obj[key] = `0${obj[key]}`
- })
- return obj
- },
- // 生成包装
- generateWrappers(row, productIndex, packingCodeList) {
- console.log('row----', row)
- console.log('是否拆包----', row.isUnpack)
- console.log('包装规格----', row.packingSpecificationOption)
- console.log('计量单位----', row.measureUnit)
- console.log('包装数量----', row.packingQuantity)
- console.log('包装编码----', packingCodeList)
- let obj = this.getNowDate()
- let productionDate = ''
- let purchaseDate = ''
- if (this.formData.bizType == '1') {
- // 生产入库
- productionDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`
- this.curDateType = productionDate
- } else if (this.formData.bizType == '2') {
- // 采购入库
- purchaseDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`
- this.curDateType = purchaseDate
- }
- console.log(this.curDateType, '----时间')
- // 判断包装单位和计量单位是否为不拆物料层规格
- let packingBoolen = !!this.getDict(row.packingUnit).dictValue
- let measureBoolen = !!this.getDict(row.measureUnit).dictValue
- let num = row.packingQuantity
- let filterArr = []
- // 处理包装单位为KG类的情况
- console.log('packingBoolen----', packingBoolen)
- console.log('measureBoolen', measureBoolen)
- if (packingBoolen) {
- filterArr = row.packingSpecificationOption.filter(item => {
- return item.packageUnit == row.packingUnit && item.packageUnit != item.conversionUnit
- })
- num = Math.ceil(row.packingQuantity / filterArr[0].packageCell)
- } else {
- console.log(row.isUnpack, 'sssssssssss')
- if (row.isUnpack) {
- if (measureBoolen) {
- // 处理包装单位不为KG类,计量单位为KG类的情况
- let splitIndex = row.packingSpecificationOption.findIndex(item => item.conversionUnit == row
- .packingUnit && item.packageUnit != item.conversionUnit)
- for (; splitIndex > 1; splitIndex--) {
- // num = this.$math.format(num * row.packingSpecificationOption[splitIndex].packageCell, 14)
- num = num * row.packingSpecificationOption[splitIndex].packageCell
- }
- } else {
- console.log(row.packingSpecificationOption)
- let splitIndex = row.packingSpecificationOption.findIndex(item => item.conversionUnit == row
- .packingUnit && item.packageUnit != item.conversionUnit)
- console.log(splitIndex)
- for (; splitIndex > 0; splitIndex--) {
- console.log(splitIndex)
- // num = this.$math.format(num * row.packingSpecificationOption[splitIndex].packageCell, 14)
- num = num * row.packingSpecificationOption[splitIndex].packageCell
- }
- }
- } else {
- num = row.packingQuantity
- }
- }
- for (let index = 0; index < num; index++) {
- let measureQuantity = 1
- // 处理包装单位为KG类,计算每桶KG值
- if (packingBoolen) {
- // console.log(this.$math.format(filterArr[0].packageCell * (index + 1), 14))
- console.log(filterArr[0].packageCell * (index + 1))
- console.log(row.packingQuantity)
- // measureQuantity =
- // Number(row.packingQuantity) > this.$math.format(filterArr[0].packageCell * (index + 1), 14)
- // ? filterArr[0].packageCell
- // : Number(row.packingQuantity) - this.$math.format(filterArr[0].packageCell * index, 14)
- measureQuantity = Number(row.packingQuantity) > filterArr[0].packageCell * (index + 1) ? filterArr[
- 0].packageCell : Number(row.packingQuantity) - filterArr[0].packageCell * index
- } else {
- if (!row.isUnpack) {
- if (measureBoolen) {
- // 处理包装单位不为KG类,计量单位为KG类的情况
- let splitIndex = row.packingSpecificationOption.findIndex(item => item.conversionUnit ==
- row.packingUnit && item.packageUnit != item.conversionUnit)
- for (; splitIndex > 0; splitIndex--) {
- // measureQuantity = this.$math.format(measureQuantity * row.packingSpecificationOption[splitIndex].packageCell, 14)
- measureQuantity = measureQuantity * row.packingSpecificationOption[splitIndex]
- .packageCell
- }
- } else {
- let splitIndex = row.packingSpecificationOption.findIndex(item => item.conversionUnit ==
- row.packingUnit && item.packageUnit != item.conversionUnit)
- for (; splitIndex > 0; splitIndex--) {
- console.log(splitIndex)
- // measureQuantity = this.$math.format(measureQuantity * row.packingSpecificationOption[splitIndex].packageCell, 14)
- measureQuantity = measureQuantity * row.packingSpecificationOption[splitIndex]
- .packageCell
- }
- }
- }
- }
- let item = {
- index: row.index + '-' + index, // 包装索引
- warehouseId: row.warehouseIds[0], // 仓库id
- warehouseName: row.warehouseNames[0], // 仓库名称
- categoryName: row.categoryName, // 产品名称
- categoryCode: row.categoryCode, // 产品编码
- categoryModel: row.categoryModel, // 物品型号
- specification: row.specification, // 规格
- brandNum: row.brandNum, // 牌号
- parentIndex: row.index, // 产品索引
- batchNo: row.batchNo, // 批次号
- packageNo: packingCodeList[index].onlyCode, // 包装编码
- packingQuantity: 1, // 包装数量
- packingUnit: row.isUnpack ?
- packingBoolen ?
- filterArr[0].conversionUnit :
- measureBoolen ?
- row.packingSpecificationOption[1].conversionUnit :
- row.measureUnit : packingBoolen ?
- filterArr[0].conversionUnit : row.packingUnit,
- measureQuantity: row.isUnpack ? (packingBoolen ? measureQuantity : measureBoolen ? row
- .packingSpecificationOption[1].packageCell : measureQuantity) : measureQuantity, // 计量数量
- measureUnit: row.isUnpack ? (measureBoolen ? row.packingSpecificationOption[1].packageUnit :
- row.measureUnit) : row.measureUnit, // 计量单位
- weight: 0, // 重量
- packingSpecificationOption: row.packingSpecificationOption, // 包装规格
- weightUnit: row.weightUnit, // 重量单位
- netWeight: row.netWeight, // 净重
- barcodes: '', // 发货条码
- clientCode: '', // 客户代号
- materielDesignation: '', // 物料代号
- engrave: '', // 刻码
- isUnpack: row.isUnpack, // 是否允许拆包
- productionDate: productionDate, // 生产日期
- purchaseDate: purchaseDate, // 采购时间
- result: 1, // 结果(1合格 2不合格)
- status: 1 // 状态(0=未质检 1已质检)
- }
- let outBoolen = !!this.getDict(item.measureUnit).dictValue
- console.log('this.dictCodeList-------', this.dictCodeList)
- console.log('item.measureUnit-------', item)
- console.log('!!this.getDict(item.measureUnit).dictValue--------', this.getDict(item.measureUnit))
- if (outBoolen) {
- // 计量单位为KG类,直接替换
- item.weight = item.measureQuantity
- } else {
- // 计量单位为不为KG类,重新统计计算
- let inBoolen = !!this.getDict(item.packingSpecificationOption[0].packageUnit).dictValue
- let startIndex = item.packingSpecificationOption.findIndex(ite => {
- return item.measureUnit == ite.packingUnit && ite.packingUnit != ite.conversionUnit
- })
- console.log(startIndex)
- let endIndex = item.packingSpecificationOption.findIndex(ite => item.packingUnit == ite
- .conversionUnit)
- console.log(endIndex)
- let total = item.packingQuantity
- for (; startIndex < endIndex; endIndex--) {
- // total = this.$math.format(item.packingSpecificationOption[endIndex].packageCell * total, 14)
- total = item.packingSpecificationOption[endIndex].packageCell * total
- }
- if (inBoolen) {
- // 第二层为KG类
- item.weight = total
- } else {
- // 第二层不为KG类
- // item.weight = this.$math.format(total * item.netWeight, 14)
- item.weight = total * item.netWeight
- }
- }
- row.outInDetailRecordRequestList.push(item)
- }
- // // 单独点击保存并插入对应位置(包装)
- // if (productIndex == 0) {
- // this.packingList.splice(productIndex, 0, ...packingList)
- // } else {
- // let packingIndex = this.packingList.findLastIndex(item => item.parentIndex == this.productList[productIndex - 1].index)
- // this.packingList.splice(packingIndex + 1, 0, ...packingList)
- // }
- },
- async requireDictCode() {
- // 不拆物料层规格列表
- const res = await getByCode('material_layer')
- this.dictCodeList = res.map(item => {
- const arr = Object.entries(item)
- return {
- dictCode: arr[0][0],
- dictValue: arr[0][1]
- }
- })
- },
- getDict(dictCode) {
- // 不拆物料层规格列表
- if (this.dictCodeList.length > 0) {
- return this.dictCodeList.find(item => item.dictCode == dictCode) || {}
- } else {
- return {}
- }
- },
- async computeNum(row, index, isClear) {
- console.log(row)
- console.log(row.packingQuantity)
- console.log(row.packingUnit)
- // 清空仓库(包装数量输入)
- if (isClear) {
- // this.$set(this.productList[index], 'warehouseId', '')
- // this.$set(this.productList[index], 'warehouseName', '')
- if (row.packingQuantity < 1) {
- this.$set(this.productList[index], 'packingQuantity', 1)
- } else if (row.packingQuantity > 9999) {
- this.$set(this.productList[index], 'packingQuantity', 9999)
- } else {
- this.$set(this.productList[index], 'packingQuantity', row.packingQuantity.replace(
- /[^\d\.{2,}]/g, ''))
- }
- }
- if (row.packingQuantity && row.packingUnit) {
- let startIndex = row.packingSpecificationOption.findIndex(ite => {
- return row.measuringUnit == ite.packingUnit && ite.packingUnit != ite.conversionUnit
- })
- console.log(startIndex)
- let endIndex = row.packingSpecificationOption.findIndex(ite => row.packingUnit == ite
- .conversionUnit)
- console.log(endIndex)
- let total = row.packingQuantity
- for (; startIndex < endIndex; endIndex--) {
- total = row.packingSpecificationOption[endIndex].packageCell * total
- }
- row.measureQuantity = total
- // 判断包装单位和计量单位是否为不拆物料层规格
- console.log(this.getDict(row.packingUnit))
- let packingBoolen = !!this.getDict(row.packingUnit).dictValue
- let measureBoolen = !!this.getDict(row.measureUnit).dictValue
- if (packingBoolen || measureBoolen) {
- row.weight = total
- } else {
- row.weight = total * row.netWeight
- }
- }
- },
- //获取仓库
- async getwarehouseList() {
- let res = await getWarehouseList()
- this.warehouseListOption = [res.data]
- },
- showWarehousePicker(index) {
- this.currentProductIndex = index
- this.warehouseShow = true
- },
- showPackingUnitPicker(data, index) {
- this.currentProductIndex = index
- this.currentPackingSpecificationOption = [data.packingSpecificationOption]
- this.packingUnitsShow = true
- },
- showSupplierPicker(data, index) {
- this.currentProductIndex = index
- this.currentSupplierListOption = [data.supplierListOptions]
- this.suppliersShow = true
- },
- selectPackingUnitInfo(e) {
- this.productList[this.currentProductIndex].packingUnit = e.value[0]?.conversionUnit
- this.computeNum(this.productList[this.currentProductIndex], this.currentProductIndex)
- this.packingUnitsShow = false
- },
- selectSuppliersInfo(e) {
- this.productList[this.currentProductIndex].supplierName = e.value[0]?.name
- this.productList[this.currentProductIndex].supplierId = e.value[0]?.id
- this.suppliersShow = false
- },
- selectWarehouseInfo(e) {
- this.productList[this.currentProductIndex].warehouseName = e.value[0]?.name
- this.productList[this.currentProductIndex].warehouseId = e.value[0]?.id
- this.productList[this.currentProductIndex].warehouseNames = [e.value[0]?.name]
- this.productList[this.currentProductIndex].warehouseIds = [e.value[0]?.id]
- this.warehouseShow = false
- },
- selectTimeTypeInfo(e) {
- this.curDateType = e.value[0]?.prop
- this.timeTypeShow = false
- },
- sceneStateFilter(bizType) {
- if (bizType) {
- return this.sceneState.filter(item => item.value == bizType)[0].text
- }
- },
- formatter(dataTime) {
- return dayjs(dataTime).format('YYYY-MM-DD HH:mm:ss')
- },
- timeConfirm() {
- this.timeShow = false
- this.$nextTick(() => {
- console.log(this.storageTime)
- console.log(this.formatter(this.storageTime))
- this.formData.storageTime = this.formatter(this.storageTime)
- console.log(this.formData)
- })
- },
- timeCancel() {
- this.timeShow = false
- },
- openPicker() {
- this.$refs.treePicker._show()
- },
- // 获取物品列表
- async getListItems() {
- this.goodsLists = await getTreeByGroup({
- type: 2
- })
- },
- confirm(data, name, allList) {
- console.log('name-------', name)
- this.assetTypeName = name
- this.formData.extInfo.assetType = allList.map(item => item.id)
- },
- handleScan() {
- if (this.formData.bizType !== '' && this.formData.bizType != 5) {
- uni.showModal({
- title: '提示',
- content: '仅退还入库支持扫码,是否清除已选明细并切换至退还入库?',
- success: async res => {
- if (res.confirm) {
- this.productList = []
- this.formData.bizType = 5
- this.getData()
- }
- }
- })
- return
- }
- this.getData()
- },
- // goScan () {
- // uni.navigateTo({
- // url: '/pages/ScanCode/ScanCode'
- // })
- // },
- // 根据条码请求设备数据 @_@
- getData() {
- let par = {
- barType: this.qrContent.split('@_@')[1] || 0,
- qrContent: this.qrContent
- }
- // uni.showLoading({
- // title: '加载中',
- // mask: true
- // })
- // postJ(this.apiUrl + '/scan/getAssetInfo', par)
- // .then(res => {
- // let data = res.data
- // console.log(data, 'qrContent')
- // if (data.assetType === undefined) {
- // uni.showToast({
- // title: '请扫码物品码',
- // icon: 'none'
- // })
- // return
- // } else if (data.source == 2) {
- // uni.showModal({
- // title: '提示',
- // content: '当前物品已在库',
- // success: async res => {}
- // })
- // return
- // } else if (this.warehousingName && this.formData.assetType != data.assetType) {
- // uni.showToast({
- // title: `当前物品不属于${this.warehousingName}分类`,
- // icon: 'none'
- // })
- // return
- // }
- // this.setScanMaterial(data)
- // })
- // .finally(() => {
- // uni.hideLoading()
- // })
- },
- async setScanMaterial(data) {
- this.formData.assetType = data.assetType
- this.formData.bizType = 5
- const curMap = {
- assetId: 'id',
- assetCode: 'informationCode', //编码
- assetName: 'informationName', //名称
- materialId: 'id',
- materialName: 'informationName',
- batchNo: '', //批次号
- unit: 'measuringUnit', //单位
- minPackUnit: 'packingUnit' //最小包装单位
- }
- let obj = {}
- for (const key in curMap) {
- obj[key] = (curMap[key] && data.information[curMap[key]]) || ''
- }
- let detailObj = uni.$u.deepClone(obj)
- detailObj.onlyCode = data.assetCode
- obj = {
- ...data.information,
- ...obj,
- ...{
- cargoSpaceCode: '', //货位编码
- cargoSpaceId: '', //货位id
- shelfId: '', //货架id
- shelfCode: '', //货架名称
- areaId: '', //库区id
- areaName: '', //库区名称
- warehouseId: '', //仓库id
- warehouseName: '', //仓库名称
- measurementUnit: '',
- bizStatus: 1,
- contentImage: []
- }
- }
- let warehouseLedgerDetails = [detailObj]
- this.productList.push(obj)
- this.$set(this.productList[this.productList.length - 1], 'warehouseLedgerDetails',
- warehouseLedgerDetails)
- this.$set(this.productList[this.productList.length - 1], 'selfWarehouseLedgerDetails', uni.$u
- .deepClone(warehouseLedgerDetails))
- this.handleBatchSetting(obj, this.productList.length - 1, true)
- },
- calcSum(a, b, c, row) {
- if ((Number.isNaN(+a) && a !== '') || (Number.isNaN(+b) && b !== '') || (Number.isNaN(+c) && c !== '')) {
- return ''
- }
- return a * b * c + {
- yuan: '元',
- wanyuan: '万元'
- } [row.univalenceUnit]
- },
- handleBatchSetting(item, index, isScan = false) {
- this.settingIndex = index
- uni.setStorageSync('inputData', item)
- uni.setStorageSync('productList', this.productList || [])
- uni.navigateTo({
- url: '/pages/warehouse/enterHouse/batchNumEdit?bizType=' + this.formData.bizType +
- '&assetType=' + this.formData.assetType + '&index=' + index + '&isScan=' + isScan
- })
- },
- chooseFile(file) {
- console.log(file)
- this.$refs.lFile.upload({
- //替换为你的上传接口地址
- url: this.apiUrl + '/data/doc/add',
- // 服务端接收附件的key
- name: 'file',
- //根据你接口需求自定义 (优先不传content-type,安卓端无法收到参数再传)
- header: {
- Authorization: 'bearer eyJhbGciO',
- uid: '27682',
- client: 'app'
- }
- // 限制选择附件的大小上限,默认10M
- // maxSize: 20,
- // 若需要在body单独添加附件名或附件大小如下方式传入组件:
- // addName: '后端要的附件名称字段key,此处请勿写name的同值如(file),会覆盖name',
- // addSize: '后端要的附件大小字段key'
- // body参数直接写key,value,如:
- // date: '2020-1-1',
- // key2: 'value2',
- })
- },
- changeType(e) {
- this.formData.bizType = e
- },
- // 抬头下拉信息保存
- handlePicker(e, list, idKey, nameKey) {
- console.log('e?.detail--------------', e)
- if (idKey) {
- this.formData[idKey] = list[e?.detail.value]?.value
- }
- if (nameKey) {
- this.formData[nameKey] = list[e?.detail.value]?.text
- }
- this.$nextTick(() => {
- if (idKey === 'assetType' || idKey === 'bizType') {
- this.$refs.formRef.validateField(idKey)
- }
- console.log('this.formData.bizType---', this.formData.bizType)
- })
- },
- // 抬头下拉信息保存
- handleDictPicker(e, list, idKey, nameKey) {
- if (idKey) {
- this.formData[idKey] = list[e?.detail.value]?.dictCode
- }
- if (nameKey) {
- this.formData[nameKey] = list[e?.detail.value]?.dictValue
- }
- this.$nextTick(() => {
- if (idKey === 'assetType' || idKey === 'bizType') {
- this.$refs.formRef.validateField(idKey)
- }
- })
- },
- // 明细下拉信息保存
- handleListPicker(e, list, item, idKey, nameKey) {
- if (idKey) {
- item[idKey] = list[e.detail.value].id
- }
- if (nameKey) {
- item[nameKey] = list[e.detail.value].name
- }
- },
- //获取仓库信息
- handleWarehouseChoose(item) {
- this.$refs.warehouseChooseRef.openDefault(item, res => {
- Object.assign(item, res)
- })
- },
- //状态
- getstatus(e) {
- this.formData.houseType = this.statusList[e.detail.value].name
- },
- //上传附件
- getUpFlie(res) {
- console.log(res)
- let arr = []
- res.forEach(item => {
- let obj = {
- accessUrl: item.accessUrl,
- docId: item.docId,
- name: item.name,
- size: item.size,
- url: item.url,
- type: 1
- }
- // obj.type.id = item.type.id;
- // obj.type.value = item.type.name;
- arr.push(obj)
- })
- this.formData.attaments = arr
- },
- //选择入库类别跳转
- selectType() {
- if (!this.formData.extInfo.assetType) {
- uni.showToast({
- title: '请选择物品类型',
- icon: 'none'
- })
- return
- }
- if (!this.formData.bizType) {
- uni.showToast({
- title: '请选择入库场景',
- icon: 'none'
- })
- return
- }
- uni.navigateTo({
- url: '/pages/warehouse/enterHouse/selectEnterType?assetType=' + this.formData.extInfo.assetType
- })
- },
- //删除
- getDelete(index) {
- uni.showModal({
- title: '提示',
- content: '是否删除当前物品',
- success: res => {
- if (res.confirm) {
- this.productList.splice(index, 1)
- }
- }
- })
- },
- deletePacking(index, idx) {
- uni.showModal({
- title: '提示',
- content: '是否删除当前包装',
- success: res => {
- if (res.confirm) {
- this.productList[index].outInDetailRecordRequestList.splice(idx, 1)
- this.productList[index].packingQuantity = this.productList[index].packingQuantity -
- 1
- }
- }
- })
- },
- // 入库操作
- // listEdit(row) {
- // this.$set(row, 'isSave', false)
- // },
- // listSave(row, index) {
- // const fileds = [`productList.${index}.cargoSpaceCode`, `productList.${index}.batchNum`]
- // if (this.formData.bizType != 5) {
- // fileds.push(...[`productList.${index}.outInNum`, `productList.${index}.measurementUnit`])
- // } else if (this.productList.some(i => !i.selfWarehouseLedgerDetails?.length)) {
- // uni.showToast({
- // title: '请选择资产编号!',
- // icon: 'none'
- // })
- // return
- // }
- // Promise.all(
- // fileds.map(
- // item =>
- // new Promise(async (resolve, rej) => {
- // this.$refs.lisrFormRef.validateField(item, err => {
- // if (err?.length) {
- // rej(err)
- // } else {
- // resolve()
- // }
- // })
- // })
- // )
- // )
- // .then(res => {
- // this.$set(row, 'isSave', true)
- // if (this.formData.bizType != 5) {
- // this.createMaterialCode(row)
- // } else {
- // // 退还
- // this.createMaterialCodeReturn(row)
- // }
- // })
- // .catch(err => {
- // uni.showToast({
- // icon: 'error',
- // title: '请填入必填项!'
- // })
- // })
- // },
- //入库明细删除
- listDel(row, index) {
- this.productList.splice(index, 1)
- },
- // 入库明细生成条码信息
- async createMaterialCode(row) {
- return
- // 添加相同物品重新更新明细 原料编码
- const list = this.productList.filter(i => i.assetCode === row.assetCode && i.batchNum === row
- .batchNum && i.isSave)
- const num = list.reduce((num, pre) => {
- num += row.isUnpack ? pre.outInNum * pre.measurementUnit : pre.outInNum
- return num
- }, 0)
- const res = await postJ(this.apiUrl + '/outInWarehouse/getAssetNum', {
- batchNum: row.batchNum,
- assetCode: row.assetCode,
- num
- })
- if (res?.success) {
- list.forEach(item => {
- if (item.warehouseLedgerDetails?.length) {
- item.warehouseLedgerDetails.forEach(i => {
- i.onlyCode = res.data.shift().onlyCode
- })
- } else {
- this.$set(
- item,
- 'warehouseLedgerDetails',
- Array.from(new Array(item.isUnpack ? item.outInNum * item.measurementUnit :
- +item.outInNum), (val, idx) => {
- return {
- ...item,
- onlyCode: res.data.shift().onlyCode,
- bizStatus: 1,
- contentImage: []
- }
- })
- )
- }
- })
- }
- // 添加相同物品,重复批次号 重新更新明细 包装编码
- const batchList = this.productList.filter(i => i.batchNum === row.batchNum && i.isSave)
- if (batchList.length) {
- const num = batchList.reduce((num, pre) => {
- num += +pre.outInNum
- return num
- }, 0)
- const res1 = await postJ(this.apiUrl + '/outInWarehouse/getAssetNum', {
- batchNum: row.batchNum,
- num
- })
- if (res1?.success) {
- batchList.forEach(item => {
- let num = res1.data.shift()?.num
- let measurementUnit = item.measurementUnit
- if (item.warehouseLedgerDetails?.length) {
- item.warehouseLedgerDetails.forEach((i, index) => {
- this.$set(i, 'num', num)
- if (!item.isUnpack) {
- if (index < item.warehouseLedgerDetails.length - 1) {
- num = res1.data.shift()?.num
- }
- } else {
- // 拆包的包装编码一致
- measurementUnit--
- if (measurementUnit === 0 && index < item
- .warehouseLedgerDetails.length - 1) {
- measurementUnit = item.measurementUnit
- num = res1.data.shift()?.num
- }
- }
- })
- }
- })
- }
- }
- },
- // 入库明细生成条码信息 退还
- async createMaterialCodeReturn(row) {
- return
- // 添加相同物品重新更新明细 原料编码
- const list = this.productList.filter(i => i.batchNum === row.batchNum && i.isSave)
- // 退还
- const res = await postJ(this.apiUrl + '/outInWarehouse/getAssetNum', {
- batchNum: row.batchNum,
- num: list.reduce((num, pre) => {
- num += pre.selfWarehouseLedgerDetails.length
- return num
- }, 0)
- })
- if (res?.success) {
- list.forEach(item => {
- const num = res.data.shift().num
- if (item.warehouseLedgerDetails?.length) {
- item.warehouseLedgerDetails.forEach(i => {
- i.num = num
- if (!item.isUnpack) {
- // 拆包的包装编码一致
- num = res.data.shift()?.num
- }
- })
- } else {
- this.$set(
- item,
- 'warehouseLedgerDetails',
- item.selfWarehouseLedgerDetails.map((val, idx) => {
- let obj = {
- ...val,
- bizStatus: 1,
- batchNum: item.batchNum,
- cargoSpaceCode: item.cargoSpaceCode, //货位编码
- cargoSpaceId: item.cargoSpaceId, //货位id
- shelfId: item.shelfId, //货架id
- shelfCode: item.shelfCode, //货架名称
- areaId: item.areaId, //库区id
- areaName: item.areaName, //库区名称
- warehouseId: item.warehouseId, //仓库id
- warehouseName: item.warehouseName, //仓库名称
- num
- }
- if (!item.isUnpack) {
- // 拆包的包装编码一致
- num = res.data.shift()?.num
- }
- return obj
- })
- )
- }
- })
- }
- },
- //确定提交
- getsure() {
- return
- this.$refs.formRef.validate().then(res => {
- if (!this.productList?.length) {
- uni.showToast({
- icon: 'error',
- title: '请添加明细!'
- })
- return
- } else if (this.productList.some(item => !item.warehouseLedgerDetails?.length)) {
- uni.showToast({
- icon: 'error',
- title: '请完善明细信息!'
- })
- return
- }
- const params = {
- outInWarehouse: {
- ...this.formData,
- bizStatus: 1
- },
- warehouseLedgerInfos: this.productList
- }
- postJ(this.apiUrl + '/outInWarehouse/add', params).then(res => {
- if (res?.success) {
- uni.showToast({
- icon: 'success',
- title: '保存成功'
- })
- setTimeout(() => {
- uni.navigateBack({
- delta: 1
- })
- }, 1500)
- }
- })
- })
- },
- // 部门确认
- deptConfirm(data, name) {
- this.formData.deptName = name
- this.formData.deptCode = data[0]
- },
- // 部门确认
- verifyDeptConfirm(data, name) {
- this.formData.verifyDeptCode = data[0]
- this.formData.verifyDeptName = name
- this.formData.verifyId = ''
- this.formData.verifyName = ''
- this.getUser(data[0])
- },
- // 获取部门
- getDept() {
- return
- get(this.apiUrl + '/main/org/dept/effectiveTree').then(res => {
- if (res?.success) {
- this.deptList = res.data
- }
- })
- },
- // 获取供应商
- getSupplier() {
- // post(this.apiUrl + `/main/supplier/list?page=1&size=999`, {
- // page: 1,
- // size: 999
- // }).then(res => {
- // if (res?.success) {
- // this.supplierList = res.data.items
- // }
- // })
- },
- // 获取人员
- getUser(deptCode) {
- // post(this.apiUrl + '/main/user/list', {
- // deptCode,
- // page: 1,
- // size: 9999
- // }).then(res => {
- // if (res?.success) {
- // this.userList = res.data.items.map(item => {
- // item.name = item.trueName
- // item.id = item.userId
- // return item
- // })
- // }
- // })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .mainBox {
- padding-bottom: 120rpx;
- }
- /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;
- // background-color: red;
- .u-form-item__body__right__content {
- width: 100%;
- display: inline-block !important;
- }
- }
- }
- // ::v-deep .listCont .u-input {
- // height: 60rpx !important;
- // }
- ::v-deep .dd .u-form-item__body__right {
- border: 1px solid #e5e5e5 !important;
- border-radius: 4px;
- line-height: 60rpx;
- }
- .ellipsis {
- max-width: 100%;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .picList {
- display: flex;
- align-items: center;
- justify-items: flex-start;
- flex-wrap: wrap;
- }
- /deep/.baseForm {
- .u-form-item__body {
- padding: 4px !important;
- }
- .assetType_box {
- padding: 12rpx 18rpx;
- width: 100%;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- font-size: 30rpx;
- }
- }
- /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;
- 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%;
- 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: 28rpx;
- font-weight: bold;
- }
- .btn {
- display: flex;
- justify-content: flex-end;
- }
- .weight {
- width: 30%;
- font-size: 24rpx;
- 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 {
- height: 100% !important;
- 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: 670rpx;
- 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: 60rpx !important;
- padding: 0 0 0 9px !important;
- }
- .item {
- width: 100%;
- font-size: 28rpx;
- margin-bottom: 10rpx;
- margin-right: 3%;
- /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;
- align-items: center;
- margin-bottom: 10rpx;
- .title {
- flex: 1;
- font-size: 30rpx;
- }
- .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);
- }
- .flex_between {
- display: flex;
- justify-content: space-between;
- }
- </style>
|