12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904 |
- // 完善入库信息
- <template>
- <div class="container">
- <el-row>
- <el-col :span="20">
- <h2 class="bg-left title">入库皮重检斤</h2>
- </el-col>
- <el-col :span="4" class="bg-right">
- <el-button class="bg-bottom" type="primary" size="small" @click="revert()"><img width="6" height="10"
- style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
- </el-button>
- </el-col>
- </el-row>
- <ws-form ref="dataList" :model="dataList" :rules="rules">
- <div class="basicInformation">
- <h2>
- {{ deptBudgetList1.warehouseName }}
- <span class="position" v-show="this.$route.query.warehouseType == 1">
- {{ deptBudgetList1.binNumber }}仓位
- </span>
- <span v-show="this.$route.query.warehouseType == 2">(临)</span>
- </h2>
- <div class="balance-row">
- <BalanceAlert v-if='isShowBalance' class="left" ref="weightChild" :deptBudgetList='deptBudgetList'
- :information='information' v-on:balanceListen="setVal"></BalanceAlert>
- <div class="top">
- <div class="car-type">皮重</div>
- <!-- <div class="weight">{{deptBudgetList.grossWeight}} <span class="kg-style">kg</span></div> -->
- <div class="weight">
- {{ dataList.tare }} <span class="kg-style">kg</span>
- </div>
- <div class="car-no">{{ dataList.carNo }}</div>
- </div>
- </div>
- <div class="small-title">基本信息</div>
- <div class="flex">
- <div class="left" style='width:66.6666%;'>
- <ws-info-table>
- <!--任务编号-->
- <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
- <el-select filterable clearable v-model="dataList.inOutTaskNo" placeholder="请选择任务编号" class="typeselect"
- @change="contractNoChange">
- <el-option v-for="item in deptBudgetList2" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
- :value="item.inOutTaskNo" />
- </el-select>
- </ws-form-item>
- <!--毛重(公斤)-->
- <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
- <ws-input :disabled="allowEdit" @input="grossWeightchange" v-model="dataList.grossWeight"
- placeholder="请输入毛重" maxlength="20" size="small" />
- </ws-form-item>
- <ws-form-item label="合同编号" span="1" prop="contractNo">
- <el-select disabled filterable clearable :filter-method="dataFilter1" v-model="dataList.contractNo"
- placeholder="请选择合同编号或移库任务编号" class="typeselect" @change="contractNoChange">
- <el-option v-for="item in outContractNo1" :key="item.constKey" :label="item.contractNo"
- :value="item.contractNo" />
- </el-select>
- </ws-form-item>
- <!--皮重(公斤)-->
- <ws-form-item label="皮重(公斤)" span="1" prop="tare" class="readonly">
- <ws-input :disabled="allowEdit" @input="tarechange" v-model="dataList.tare" placeholder="请输入皮重"
- maxlength="100" size="small" />
- <el-button type="primary" @click="openPort">重新获取</el-button>
- </ws-form-item>
- <ws-form-item label="提示" span="1" prop="tips">
- <ws-input onmouseover="this.title=this.value" v-model="dataList.tips" maxlength="20" size="small" />
- </ws-form-item>
- <ws-form-item label="扣重(公斤)" span="1" prop="deductionWeight" class="readonly">
- <ws-input @input="tarechange" v-model="dataList.deductionWeight" placeholder="请输入扣重" maxlength="100"
- size="small" />
- </ws-form-item>
- <!-- 货名 -->
- <ws-form-item label="货名" span="1">
- <ws-select disabled v-model="dataList.goodsName" placeholder class="typeselect"
- @change="selectgoodsName">
- <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
- :value="item.constValue" />
- </ws-select>
- </ws-form-item>
- <!--净重(公斤)-->
- <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
- <ws-input disabled v-model="dataList.netWeight" placeholder="不可编辑,自动计算" maxlength="120" size="small" />
- </ws-form-item>
- <ws-form-item label="类型" span="1" prop="type">
- <ws-select disabled v-model="dataList.type" @change="typeChange">
- <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
- </ws-select>
- </ws-form-item>
- <ws-form-item label="扣款(元/公斤)" span="1" prop="deductionAmount">
- <ws-input @input="kkInput(dataList.deductionAmount)" v-model="dataList.deductionAmount"
- placeholder="请输入扣款金额" maxlength="120" size="small" />
- </ws-form-item>
- <!-- 品级 -->
- <ws-form-item label="品级" span="1" class="readonly">
- <ws-select v-model="dataList.grade" placeholder class="typeselect" @change="selectpackingMethod">
- <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
- :value="item.constValue" />
- </ws-select>
- </ws-form-item>
- <ws-form-item label="入库日期" span="1" prop="inOutDate" class="deliverydate">
- <el-date-picker v-model="dataList.inOutDate" placeholder="请选择入库日期" type="date"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- </ws-form-item>
- <!-- 经办人 -->
- <ws-form-item label="经办人" span="1" prop="agent">
- <el-select v-model="dataList.agent" placeholder="请选择经办人" filterable clearable @change="selectstaff">
- <el-option v-for="item in options" :key="item.value" :label="item.staffName"
- :value="item.staffName" />
- </el-select>
- </ws-form-item>
- <!-- 入库类型 -->
- <ws-form-item label="入库类型" span="1">
- <ws-select v-model="dataList.inOutType" placeholder class="typeselect" @change="selectstorageType"
- :disabled="isSelectType">
- <ws-option v-for="item in storageType" :key="item.constKey" :label="item.constValue"
- :value="item.constValue" />
- </ws-select>
- </ws-form-item>
- <!--
- <ws-form-item
- v-if="dataList.type == '潮粮'"
- label="扣重比"
- span="1"
- prop="buckleWeightRatio"
- class="readonly"
- >
- <ws-input
- @input="pureweight"
- v-model="dataList.buckleWeightRatio"
- placeholder="请输入扣重比"
- maxlength="100"
- size="small"
- />
- </ws-form-item>
- <ws-form-item
- v-if="dataList.type == '潮粮'"
- label="干粮水分占比"
- span="1"
- prop="solidGrainWater"
- class="readonly"
- >
- <ws-input
- @input="pureweight"
- v-model="dataList.solidGrainWater"
- placeholder="请输入干粮水分占比"
- maxlength="100"
- size="small"
- />
- </ws-form-item>
- <ws-form-item
- v-if="dataList.type == '潮粮'"
- label="潮粮水分占比"
- span="1"
- prop="tidalGrainWater"
- class="readonly"
- >
- <ws-input
- @input="pureweight"
- v-model="dataList.tidalGrainWater"
- placeholder="请输入潮粮水分占比"
- maxlength="100"
- size="small"
- />
- </ws-form-item>
- <ws-form-item
- v-if="dataList.type == '潮粮'"
- label="纯重"
- span="1"
- prop="pureWeight"
- class="readonly"
- >
- <ws-input
- disabled
- v-model="dataList.pureWeight"
- placeholder="不可编辑,自动计算"
- maxlength="100"
- size="small"
- />
- </ws-form-item>
- -->
- </ws-info-table>
- </div>
- <div class="right" style='width:33.3333%;'>
- <ws-info-table>
- <ws-form-item label="成本(元/吨)" span="1" prop="cost">
- <ws-input :disabled="disabled1" v-model="dataList.cost" placeholder="请输入成本" size="small" />
- <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
- src="../../../public/img/edit.png" @click="editClick(1)" alt="" />
- </ws-form-item>
- <ws-form-item label="运费(元/吨)" span="1" prop="freight">
- <ws-input :disabled="disabled2" v-model="dataList.freight" placeholder="请输入运费" size="small" />
- <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
- src="../../../public/img/edit.png" @click="editClick(2)" alt="" />
- </ws-form-item>
- <!--入库方式-->
- <ws-form-item label="运输方式" span="1" prop="outType">
- <el-select v-model="deptBudgetList.outType" placeholder="请选择运输方式" filterable clearable>
- <el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
- </el-select>
- </ws-form-item>
- <!--车牌号 -->
- <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
- deptBudgetList.outType == '汽运' ||
- deptBudgetList.outType == '集装箱船'
- ">
- <ws-input v-if="!carstatus" v-model="dataList.carNo" placeholder="请输入车牌号" maxlength="7" size="small" />
- <el-select v-if="carstatus" filterable clearable :filter-method="dataFilter2" v-model="dataList.carNo"
- placeholder="请选择车牌号" class="typeselect" @change="carChange">
- <el-option v-for="item in options2" :key="item.constKey"
- :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
- </el-select>
- <span style='padding-left:10px;'>发货重量(吨):{{dataList.loadNetWeight}}</span>
- </ws-form-item>
- <!--船名 -->
- <ws-form-item label="船名" span="1" prop="carNo" v-if="deptBudgetList.outType == '散船'">
- <ws-input v-model="deptBudgetList.carNo" placeholder="请输入船名" size="small" />
- </ws-form-item>
- <!--车号 -->
- <ws-form-item label="车号" span="1" prop="carNo" v-if="deptBudgetList.outType == '火运'">
- <ws-input v-model="deptBudgetList.carNo" placeholder="请输入车号" size="small" />
- </ws-form-item>
- <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
- deptBudgetList.outType == '汽运' ||
- deptBudgetList.outType == '集装箱船'
- ">
- <ws-input v-model="dataList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
- </ws-form-item>
- <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
- deptBudgetList.outType == '汽运' ||
- deptBudgetList.outType == '集装箱船'
- ">
- <ws-input v-model="dataList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
- </ws-form-item>
- <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
- deptBudgetList.outType == '汽运' ||
- deptBudgetList.outType == '集装箱船'
- ">
- <ws-input v-model="dataList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
- </ws-form-item>
- <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
- deptBudgetList.outType == '汽运' ||
- deptBudgetList.outType == '集装箱船'
- ">
- <ws-input v-model="dataList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
- </ws-form-item>
- <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="deptBudgetList.outType == '火运'">
- <ws-input v-model="dataList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
- </ws-form-item>
- <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="deptBudgetList.outType == '火运'">
- <ws-input v-model="dataList.wingNumberOther" placeholder="请输入车厢号" maxlength="20" size="small" />
- </ws-form-item>
- </ws-info-table>
- </div>
- </div>
- <div v-show="
- this.$route.query.warehouseType == 2 &&
- this.$route.query.createType == 2
- ">
- <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
- <ws-info-table v-show="checked == true">
- <!-- 出库类型 -->
- <ws-form-item label="出库类型" span="1">
- <ws-select v-model="dataList.temporaryOutType" placeholder="" class="typeselect">
- <ws-option v-for="item in deliveryType" :key="item.constKey" :label="item.constValue"
- :value="item.constValue" />
- </ws-select>
- </ws-form-item>
- <!-- 出库合同编号 -->
- <ws-form-item label="出库合同编号" span="1">
- <ws-select v-model="dataList.contractNo" placeholder="请选择合同编号或移库任务编号" class="typeselect">
- <ws-option v-for="item in outContractNo" :key="item.constKey" :label="item.contractNo"
- :value="item.contractNo" />
- </ws-select>
- </ws-form-item>
- </ws-info-table>
- </div>
- </div>
- <!-- <div class="small-title">上传磅单照片</div>
- <el-upload
- action="https://www.zthymaoyi.com/upload/admin"
- :show-file-list="false"
- :on-success="
- (res) => {
- uploadSuccessHandle1(res)
- }
- "
- class="avatar-uploader"
- accept=".jpg, .jpeg, .png, .gif"
- ><el-button size="small" type="primary">点击上传</el-button>
- </el-upload>
- <div>
- <img v-if='dataList.addressUrl' style='width:100px;height:100px;' :src="dataList.addressUrl" alt="">
- </div> -->
- <div class="small-title">化验数据(选填)</div>
- <div class="inspector">
- <!--质检员-->
- <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
- <ws-input
- v-model="dataList.warehouseInOutDetail.qualityInspector"
- placeholder="请输入质检员姓名"
- maxlength="120"
- size="small"
- />
- </ws-form-item> -->
- <ws-form-item label="质检员" span="1" prop="qualityInspector">
- <el-select v-model="dataList.warehouseInOutDetail.qualityInspector" placeholder="请选择质检员" filterable clearable
- @change="qualityInspectorChange">
- <el-option v-for="item in qualityInspectorList" :key="item.value" :label="item.staffName"
- :value="item.staffName" />
- </el-select>
- </ws-form-item>
- </div>
- <div class="neifor">
- <ws-info-table>
- <!--水分(%)<=-->
- <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
- <ws-input v-model="dataList.warehouseInOutDetail.waterContent" placeholder="请输入水分占比" maxlength="120"
- size="small" />
- </ws-form-item>
- <!--杂质(%)<=-->
- <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
- <ws-input v-model="dataList.warehouseInOutDetail.impurity" placeholder="请输入杂质占比" maxlength="120"
- size="small" />
- </ws-form-item>
- <!--容重(克/升)>=-->
- <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
- <ws-input v-model="dataList.warehouseInOutDetail.bulkDensity" placeholder="请输入容重" maxlength="120"
- size="small" />
- </ws-form-item>
- <!--霉变粒(%)<=-->
- <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
- <ws-input v-model="dataList.warehouseInOutDetail.mildewGrain" placeholder="请输入霉变粒占比" maxlength="120"
- size="small" />
- </ws-form-item>
- <!--热损伤(%)<=-->
- <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
- <ws-input v-model="dataList.warehouseInOutDetail.jiaorenli" placeholder="请输入热损伤占比" maxlength="120"
- size="small" />
- </ws-form-item>
- <!--不完善粒(%)<=-->
- <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
- <ws-input v-model="dataList.warehouseInOutDetail.imperfectGrain" placeholder="请输入不完善粒占比" maxlength="120"
- size="small" />
- </ws-form-item>
- </ws-info-table>
- </div>
- <div style="text-align: right; padding: 10px">
- <!-- <el-button
- class="bg-bottom-up"
- type="primary"
- size="small"
- @click="temporaryStorage()"
- >暂存</el-button
- > -->
- <el-button class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
- </div>
- </ws-form>
- </div>
- </template>
- <script>
- import {
- pullDown,
- addstorageputList,
- xialaNo,
- getstaff,
- getPrintInfo,
- getReceiptTaskNo,
- } from '@/model/warehouse/index'
- import {
- downloadFile
- } from '@/utils/batchDown'
- import Pagination from '@/components/Pagination'
- import {
- mapActions,
- mapGetters,
- mapState
- } from 'vuex'
- import WsUpload from '@/components/WsUpload'
- import BalanceAlert from '@/components/balanceAlert'
- // import { dayjs, fmoney, EventBus } from 'base-core-lib'
- import {
- dayjs,
- EventBus
- } from 'base-core-lib'
- export default {
- name: 'viewSpareMoney',
- components: {
- WsUpload,
- Pagination,
- BalanceAlert
- },
- watch: {
- // vesselId(val) {
- // this.getList()
- // },
- isShow(val) {
- this.showType = val
- },
- dataList: {
- //深度监听,可监听到对象、数组的变化
- handler(val, oldVal) {
- if (val.tare) {
- this.dataList.netWeight = this.dataList.grossWeight - val.tare
- }
- },
- deep: true, //true 深度监听
- },
- },
- computed: {
- ...mapGetters(['deptBudgetList']),
- },
- data() {
- return {
- //有没有称
- isShowBalance: false,
- information: '皮重检斤',
- deptBudgetList2: [],
- isSelectType: true,
- isGetCost: false,
- qualityInspectorList: [],
- //弹出框
- dialogViewSpareMoney: false,
- dialogApproveFormVisible: false,
- // 船舶类型
- monetaryKey: null,
- // 表格显示数据
- tableDate: [],
- // 是否显示
- showType: true,
- // 年
- year: '',
- deptBudgetTotal: 0,
- readonly: true,
- currentPage: 1,
- pageSize: 10,
- searchType: 1,
- searchKeyWord: '',
- contractType: 2,
- startDate: null,
- endDate: null,
- goodnameList: {},
- checked: true,
- disabled1: true,
- disabled2: true,
- staffList: [],
- options: [],
- storageType: [],
- deliveryType: [],
- outContractNo: [],
- outContractNo1: [],
- // 提交类型
- submitType: true,
- typeList: ['干粮', '潮粮'],
- appendixIdsAdd: '',
- uploadSuccess: {},
- warehouseInOutDetail: {},
- onChange: {},
- deptBudgetList1: [],
- gradeList: [],
- rules: {
- netWeight: [{
- required: true,
- type: 'number',
- message: '请输入活动名称',
- trigger: 'blur',
- }, ],
- },
- size: 10,
- compId: localStorage.getItem('ws-pf_compId'),
- skinInspector: localStorage.getItem('ws-pf_staffName'),
- deptCircularPage: {},
- packtypeList: {},
- date: {
- year: dayjs().format('YYYY'),
- month: dayjs().format('MM'),
- },
- options1: [],
- options2: [],
- carstatus: false,
- contractList: [],
- dataList: {
- id: '',
- grossWeight: '',
- contractNo: '',
- tare: '',
- netWeight: '',
- grade: '',
- agent: '',
- carNo: '',
- inOutDate: '',
- boxNo: '',
- boxNoOther: '',
- titleNo: '',
- titleNoOther: '',
- inOutType: '',
- goodsName: '',
- warehouseInOutDetail: {},
- cost: '',
- freight: 0,
- type: '',
- buckleWeightRatio: '',
- tidalGrainWater: '',
- solidGrainWater: '',
- pureWeight: '',
- deductionAmount: '',
- deductionWeigh: '',
- },
- historyList: [],
- pickerBeginDateBefore: {
- disabledDate: (time) => {
- return time.getTime() > Date.now()
- },
- },
- accessoryTFs: false,
- param: 9600,
- allowEdit: true,
- result1: '00',
- multiSelector: [{
- name: '汽运',
- value: '0',
- },
- {
- name: '火运',
- value: '1',
- },
- {
- name: '集装箱船',
- value: '2',
- },
- {
- name: '散船',
- value: '3',
- },
- ],
- tare:"",
- }
- },
- mounted() {},
- activated() {
- if (this.$route.query.allowEdit == 1) {
- this.allowEdit = false
- } else {
- this.allowEdit = true
- }
- this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
- this.deptBudgetList1.binNumber = this.$route.query.binNumber
- this.dataList.id = this.$route.query.id
- this.dataList.grossWeight = Math.round(this.$route.query.grossWeight * 1000)
- this.dataList.contractNo = this.$route.query.contractNo
- this.dataList.baseId = this.$route.query.baseId
- this.dataList.positionId = this.$route.query.positionId
- this.dataList.warehouseName = this.$route.query.warehouseName
- this.dataList.binNumber = this.$route.query.binNumber
- this.dataList.tare = Math.round(this.$route.query.tare * 1000)
- this.tare = this.dataList.tare
- this.dataList.netWeight = Math.round(this.$route.query.netWeight * 1000)
- this.dataList.grade = this.$route.query.grade
- this.dataList.agent = this.$route.query.agent
- this.dataList.boxNo = this.$route.query.boxNo
- this.dataList.boxNoOther = this.$route.query.boxNoOther
- this.dataList.titleNo = this.$route.query.titleNo
- this.dataList.titleNoOther = this.$route.query.titleNoOther
- this.dataList.carNo = this.$route.query.carNo
- this.dataList.carId = this.$route.query.carId
- this.dataList.inOutDate = this.$route.query.inOutDate
- this.dataList.contractNo = this.$route.query.contractNo
- this.dataList.inOutType = this.$route.query.inOutType
- this.dataList.compId = this.$route.query.compId
- this.dataList.goodsName = this.$route.query.goodsName
- this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
- this.dataList.inOutFlag = this.$route.inOutFlag
- this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
- this.dataList.statusFlag = this.$route.statusFlag
- this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
- this.dataList.warehouseType = this.$route.query.warehouseType
- this.dataList.createType = this.$route.query.createType
- this.dataList.temporaryOutType = this.$route.query.temporaryOutType
- this.dataList.cost = this.$route.query.cost
- this.dataList.freight = this.$route.query.freight
- this.dataList.type = this.$route.query.type
- this.dataList.outType = this.$route.query.outType//运输方式
- this.dataList.buckleWeightRatio = this.$route.query.buckleWeightRatio
- this.dataList.tidalGrainWater = this.$route.query.tidalGrainWater
- this.dataList.solidGrainWater = this.$route.query.solidGrainWater
- this.dataList.pureWeight = Math.round(this.$route.query.pureWeight * 1000)
- this.dataList.deductionAmount = this.$route.query.deductionAmount / 1000
- this.dataList.deductionWeight = Math.round(
- this.$route.query.deductionWeight * 1000
- )
- this.dataList.inOutTypeFlag = 1
- this.dataList.inOutTaskNo = this.$route.query.inOutTaskNo
- if (this.dataList.cost) {
- this.isGetCost = true
- this.cost = this.dataList.cost
- }
- this.getList()
- if (this.$route.query.automaticWeightAcquisition == '1') {
- this.isShowBalance = true
- }
- },
- methods: {
- setVal(data) {
- if (this.information == '毛重检斤') {
- this.dataList.grossWeight = data
- } else {
- this.dataList.tare = data
- }
- },
- openPort() {
- this.$refs.weightChild.openPort()
- },
- kkInput(val) {
- console.log(val)
- if (this.isGetCost) {
- if (this.dataList.cost > val) {
- this.dataList.cost = this.cost - this.dataList.deductionAmount
- }
- }
- },
- qualityInspectorChange(e) {
- console.log(e)
- },
- uploadSuccessHandle1(res) {
- this.dataList.addressUrl = res.url
- },
- pureweight(status) {
- console.log(this.dataList)
- if (
- this.dataList.netWeight &&
- this.dataList.tidalGrainWater &&
- this.dataList.solidGrainWater &&
- this.dataList.buckleWeightRatio
- ) {
- this.dataList.pureWeight =
- (this.dataList.netWeight *
- (100 -
- (this.dataList.tidalGrainWater - this.dataList.solidGrainWater) *
- this.dataList.buckleWeightRatio)) /
- 100
- }
- },
- //返回按钮
- revert() {
- this.$router.go(-1)
- },
- carChange(e) {
- for (let i = 0; i < this.tranCarInfoList.length; i++) {
- if (this.tranCarInfoList[i].carNo == this.dataList.carNo) {
- this.dataList.tranCarNo = this.tranCarInfoList[i].tranCarNo
- this.dataList.carId = this.tranCarInfoList[i].id
- this.dataList.freight = this.tranCarInfoList[i].tranPrice
- }
- if(this.dataList.inOutType=='移库入库'){
- if(!this.dataList.cost){
- this.dataList.cost=this.tranCarInfoList[i].cost
- }
- this.dataList.loadNetWeight=this.tranCarInfoList[i].loadNetWeight
- }
- }
- },
- typeChange(e) {},
- contractNoChange(e) {
- for (let i = 0; i < this.deptBudgetList2.length; i++) {
- if (this.deptBudgetList2[i].inOutTaskNo == e) {
- var data = this.deptBudgetList2[i]
- if (this.deptBudgetList2[i].contractNo) {
- this.dataList.contractNo = this.deptBudgetList2[i].contractNo
- } else {
- this.dataList.contractNo = this.deptBudgetList2[i].moveTaskNo
- }
- }
- }
- for (var i = 0; i < this.outContractNo.length; i++) {
- if (this.outContractNo[i].contractNo == this.dataList.contractNo) {
- if (this.outContractNo[i].inOutType == '采购入库') {
- this.dataList.tips =
- '卖方' +
- this.outContractNo[i].seller +
- '( ' +
- this.outContractNo[i].unitContractPrice +
- '元/吨)'
- this.dataList.inOutTypeKey = 1
- } else if (this.outContractNo[i].inOutType == '移库入库') {
- if (this.outContractNo[i].unitContractPrice) {
- this.dataList.tips =
- '出货库' +
- data.sendWarehouse +
- ' (' +
- this.outContractNo[i].unitContractPrice +
- '元/吨)'
- } else {
- this.dataList.tips = '出货库' + data.sendWarehouse
- }
- this.dataList.inOutTypeKey = 3
- } else if (this.outContractNo[i].inOutType == '移库出库') {
- this.dataList.tips = '出货库' + data.warehouseName
- } else if (this.outContractNo[i].inOutType == '暂存入库') {
- this.dataList.inOutTypeKey = 4
- } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
- this.dataList.inOutTypeKey = 5
- } else if (this.outContractNo[i].inOutType == '退库') {
- if (this.outContractNo[i].contractNo) {
- this.dataList.tips = '买方' + this.outContractNo[i].buyer
- } else {
- this.dataList.tips = '出货库' + data.sendWarehouse
- }
- this.dataList.inOutTypeKey = 6
- }
- this.dataList.goodsName = this.outContractNo[i].goodsName
- this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
- this.cost = this.outContractNo[i].contractPrice
- if (this.cost) {
- this.isGetCost = true
- this.dataList.cost = this.cost - this.dataList.deductionAmount
- } else {
- this.isGetCost = false
- this.dataList.cost = this.dataList.cost
- }
- this.dataList.inOutType = this.outContractNo[i].inOutType
- if (this.outContractNo[i].inOutType == '移库入库') {
- this.isSelectType = false
- } else {
- this.isSelectType = true
- }
- if (this.outContractNo[i].deliverType == '1') {
- this.carstatus = true
- } else {
- this.carstatus = false
- }
- if (this.outContractNo[i].tranCarInfoList) {
- this.options2 = this.outContractNo[i].tranCarInfoList
- this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
- // this.carstatus = true
- }
- }
- }
- },
- dataFilter1(val) {
- console.log(val)
- this.dataList.contractNo = val
- if (val) {
- //val存在
- this.options1 = this.outContractNo1.filter((item) => {
- if (
- !!~item.contractNo.indexOf(val) ||
- !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
- ) {
- return true
- }
- })
- } else {
- //val为空时,还原数组
- this.options1 = this.outContractNo
- }
- },
- dataFilter2(val) {
- this.dataList.carNo = val
- if (val) {
- //val存在
- this.options1 = this.outContractNo1.filter((item) => {
- if (
- !!~item.carNo.indexOf(val) ||
- !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
- ) {
- return true
- }
- })
- } else {
- //val为空时,还原数组
- this.options2 = this.tranCarInfoList
- }
- },
- dataFilter(val) {
- // console.log(val,"名")
- this.dataList.staffList = val
- if (val) {
- //val存在
- this.options = this.staffList.filter((item) => {
- if (
- !!~item.staffName.indexOf(val) ||
- !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
- ) {
- return true
- }
- })
- } else {
- //val为空时,还原数组
- this.options = this.staffList
- }
- },
- editClick(status) {
- this.isGetCost = false
- if (status == 1) {
- this.disabled1 = !this.disabled1
- } else {
- this.disabled2 = !this.disabled2
- }
- },
- selectstaff(e) {
- for (var i = 0; i < this.staffList.length; i++) {
- if (this.staffList[i].staffName == e) {
- this.dataList.personChargeKey = this.staffList[i].staffId
- }
- }
- },
- //暂存按钮
- temporaryStorage() {
- this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- type: 'warning',
- })
- .then(() => {
- this.$refs.dataList.validate((valid) => {
- if (valid) {
- this.dataList.compId = localStorage.getItem('ws-pf_compId')
- this.dataList.inOutFlag = 2
- this.dataList.statusFlag = 1
- let _data = JSON.parse(
- localStorage.getItem('winseaview-userInfo')
- )
- this.dataList.backOffice =
- _data.content.showCompName + '-' + _data.content.staffName
- addstorageputList(this.dataList)
- .toPromise()
- .then((response) => {
- this.$message.success('暂存成功')
- this.$router.push({
- path: 'warehouseManagementList',
- })
- })
- } else {
- EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
- return false
- }
- })
- })
- .catch(() => {
- return false
- })
- },
- //提交按钮
- submit() {
- if (this.reader) {
- this.reader.cancel()
- }
- if (!this.dataList.goodsName) {
- this.$message({
- message: '货名不能为空',
- type: 'warning',
- })
- return
- }
- if (!this.dataList.grossWeight) {
- this.$message({
- message: '毛重不能为空',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.grossWeight <= 0 ||
- this.dataList.grossWeight > 300000 ||
- (String(this.dataList.grossWeight).indexOf('.') != -1 &&
- String(this.dataList.grossWeight).length -
- (String(this.dataList.grossWeight).indexOf('.') + 1) >
- 3)
- ) {
- this.$message({
- message: '毛重输入错误',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.tare < 0 ||
- this.dataList.tare > 200000 ||
- (String(this.dataList.tare).indexOf('.') != -1 &&
- String(this.dataList.tare).length -
- (String(this.dataList.tare).indexOf('.') + 1) >
- 3)
- ) {
- this.$message({
- message: '皮重输入错误',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.deductionWeight < 0 ||
- this.dataList.deductionWeight > 10000 ||
- (String(this.dataList.deductionWeight).indexOf('.') != -1 &&
- String(this.dataList.deductionWeight).length -
- (String(this.dataList.deductionWeight).indexOf('.') + 1) >
- 3)
- ) {
- this.$message({
- message: '扣重输入错误',
- type: 'warning',
- })
- return
- }
- if (this.dataList.type == '潮粮' && !this.dataList.buckleWeightRatio) {
- this.$message({
- message: '扣重比不能为空',
- type: 'warning',
- })
- return
- }
- if (
- (this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio < 0) ||
- (this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio > 3) ||
- (this.dataList.type == '潮粮' &&
- String(this.dataList.buckleWeightRatio).indexOf('.') != -1 &&
- String(this.dataList.buckleWeightRatio).length -
- (String(this.dataList.buckleWeightRatio).indexOf('.') + 1) >
- 2)
- ) {
- this.$message({
- message: '扣重比输入错误',
- type: 'warning',
- })
- return
- }
- if (this.dataList.type == '潮粮' && !this.dataList.tidalGrainWater) {
- this.$message({
- message: '潮粮水分不能为空',
- type: 'warning',
- })
- return
- }
- if (
- (this.dataList.type == '潮粮' && this.dataList.tidalGrainWater < 1) ||
- (this.dataList.type == '潮粮' && this.dataList.tidalGrainWater > 40) ||
- (this.dataList.type == '潮粮' &&
- String(this.dataList.tidalGrainWater).indexOf('.') != -1 &&
- String(this.dataList.tidalGrainWater).length -
- (String(this.dataList.tidalGrainWater).indexOf('.') + 1) >
- 2)
- ) {
- this.$message({
- message: '潮粮水分输入错误',
- type: 'warning',
- })
- return
- }
- if (this.dataList.type == '潮粮' && !this.dataList.solidGrainWater) {
- this.$message({
- message: '干粮水分不能为空',
- type: 'warning',
- })
- return
- }
- if (
- (this.dataList.type == '潮粮' && this.dataList.solidGrainWater < 1) ||
- (this.dataList.type == '潮粮' && this.dataList.solidGrainWater > 40) ||
- (this.dataList.type == '潮粮' &&
- String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
- String(this.dataList.solidGrainWater).length -
- (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
- 1)
- ) {
- this.$message({
- message: '干粮水分输入错误',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.deductionAmount < 0 ||
- this.dataList.deductionAmount > 10000 ||
- (String(this.dataList.deductionAmount).indexOf('.') != -1 &&
- String(this.dataList.deductionAmount).length -
- (String(this.dataList.deductionAmount).indexOf('.') + 1) >
- 2)
- ) {
- this.$message({
- message: '扣款输入错误',
- type: 'warning',
- })
- return
- }
- if (!this.dataList.cost) {
- this.$message({
- message: '未获取到成本,请编辑后提交',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.cost < 0 ||
- this.dataList.cost > 20000 ||
- (String(this.dataList.cost).indexOf('.') != -1 &&
- String(this.dataList.cost).length -
- (String(this.dataList.cost).indexOf('.') + 1) >
- 2)
- ) {
- this.$message({
- message: '成本输入错误',
- type: 'warning',
- })
- return
- }
- if (!this.dataList.freight && this.dataList.freight != 0) {
- this.$message({
- message: '运费不能为空',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.freight < 0 ||
- this.dataList.freight > 100000 ||
- (String(this.dataList.freight).indexOf('.') != -1 &&
- String(this.dataList.freight).length -
- (String(this.dataList.freight).indexOf('.') + 1) >
- 2)
- ) {
- this.$message({
- message: '运费输入错误',
- type: 'warning',
- })
- return
- }
- if (!this.dataList.agent) {
- this.$message({
- message: '经办人不能为空',
- type: 'warning',
- })
- return
- }
- if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
- this.$message({
- message: '经办人输入有误',
- type: 'warning',
- })
- return
- }
- if (!this.dataList.grade) {
- this.$message({
- message: '品级不能为空!',
- type: 'warning',
- })
- return
- }
- if (!this.dataList.inOutDate) {
- this.$message({
- message: '入库日期不能为空!',
- type: 'warning',
- })
- return
- }
- if (!this.dataList.inOutType) {
- this.$message({
- message: '入库类型不能为空!',
- type: 'warning',
- })
- return
- }
- if (!this.dataList.carNo) {
- this.$message({
- message: '车牌号不能为空',
- type: 'warning',
- })
- return
- }
- if (this.dataList.carNo.length > 7) {
- this.$message({
- message: '车牌号输入错误,请输入7个字符之内',
- type: 'warning',
- })
- return
- }
- if (this.dataList.boxNo && this.dataList.boxNo.length > 20) {
- this.$message({
- message: '箱号-1输入错误',
- type: 'warning',
- })
- return
- }
- if (this.dataList.boxNoOther && this.dataList.boxNoOther.length > 20) {
- this.$message({
- message: '箱号-2输入错误',
- type: 'warning',
- })
- return
- }
- if (this.dataList.titleNo && this.dataList.titleNo.length > 20) {
- this.$message({
- message: '封号-1输入错误',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.titleNoOther &&
- this.dataList.titleNoOther.length > 20
- ) {
- this.$message({
- message: '封号-2输入错误',
- type: 'warning',
- })
- return
- }
- if (!this.dataList.contractNo) {
- this.$message({
- message: '合同编号不能为空',
- type: 'warning',
- })
- return
- }
- // if (
- // this.dataList.contractNo.length < 6 ||
- // this.dataList.contractNo.length > 20
- // ) {
- // this.$message({
- // message: '合同编号长度不符合要求,请输入6-20个字符之内',
- // type: 'warning',
- // })
- // return
- // }
- if (this.dataList.netWeight > this.$route.query.capacity) {
- this.$message({
- message: '入库量大于该仓库容量!',
- type: 'warning',
- })
- return
- }
- //自检员
- if (this.dataList.warehouseInOutDetail.qualityInspector) {
- if (
- this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
- this.dataList.warehouseInOutDetail.qualityInspector.length > 10
- ) {
- this.$message({
- message: '质检员姓名长度错误!',
- type: 'warning',
- })
- return
- }
- }
- if (this.dataList.warehouseInOutDetail.waterContent) {
- if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
- this.$message({
- message: '水分(%)非数字!',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.warehouseInOutDetail.waterContent < 1 ||
- this.dataList.warehouseInOutDetail.waterContent > 40 ||
- (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
- '.'
- ) != -1 &&
- String(this.dataList.warehouseInOutDetail.waterContent).length -
- (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
- '.'
- ) +
- 1) >
- 2)
- ) {
- this.$message({
- message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
- type: 'warning',
- })
- return
- }
- }
- //杂质
- if (this.dataList.warehouseInOutDetail.impurity) {
- if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
- this.$message({
- message: '杂质(%)非数字!',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.warehouseInOutDetail.impurity < 1 ||
- this.dataList.warehouseInOutDetail.impurity > 40 ||
- (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
- -1 &&
- String(this.dataList.warehouseInOutDetail.impurity).length -
- (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
- '.'
- ) +
- 1) >
- 2)
- ) {
- this.$message({
- message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
- type: 'warning',
- })
- return
- }
- }
- //霉变
- if (this.dataList.warehouseInOutDetail.mildewGrain) {
- if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
- this.$message({
- message: '霉变粒(%)非数字!',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
- this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
- (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
- '.'
- ) != -1 &&
- String(this.dataList.warehouseInOutDetail.mildewGrain).length -
- (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
- '.'
- ) +
- 1) >
- 2)
- ) {
- this.$message({
- message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
- type: 'warning',
- })
- return
- }
- }
- //热损伤
- if (this.dataList.warehouseInOutDetail.jiaorenli) {
- if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
- this.$message({
- message: '热损伤(%)非数字!',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
- this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
- (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
- -1 &&
- String(this.dataList.warehouseInOutDetail.jiaorenli).length -
- (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
- '.'
- ) +
- 1) >
- 2)
- ) {
- this.$message({
- message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
- type: 'warning',
- })
- return
- }
- }
- //不完善粒(%)
- if (this.dataList.warehouseInOutDetail.imperfectGrain) {
- if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
- this.$message({
- message: '不完善粒(%)非数字!',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
- this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
- (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
- '.'
- ) != -1 &&
- String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
- (String(
- this.dataList.warehouseInOutDetail.imperfectGrain
- ).indexOf('.') +
- 1) >
- 2)
- ) {
- this.$message({
- message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
- type: 'warning',
- })
- return
- }
- }
- //容重
- if (this.dataList.warehouseInOutDetail.bulkDensity) {
- if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
- this.$message({
- message: '容重(克/升)非数字!',
- type: 'warning',
- })
- return
- }
- if (
- this.dataList.warehouseInOutDetail.bulkDensity > 1000 ||
- this.dataList.warehouseInOutDetail.bulkDensity < 0 ||
- (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
- '.'
- ) != -1 &&
- String(this.dataList.warehouseInOutDetail.bulkDensity).length -
- (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
- '.'
- ) +
- 1) >
- 0)
- ) {
- this.$message({
- message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
- type: 'warning',
- })
- return
- }
- }
- this.$confirm(`确定提交皮重检斤`, {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- type: 'warning',
- })
- .then(() => {
- this.$refs.dataList.validate((valid) => {
- if (valid) {
- this.dataList.compId = localStorage.getItem('ws-pf_compId')
- this.dataList.skinInspector =
- localStorage.getItem('ws-pf_staffName')
- this.dataList.inOutFlag = 2
- this.dataList.statusFlag = 3
- this.dataList.grossWeight = (
- this.dataList.grossWeight / 1000
- ).toFixed(2)
- this.dataList.tare = (this.dataList.tare / 1000).toFixed(2)
- this.dataList.netWeight = (
- this.dataList.netWeight / 1000
- ).toFixed(2)
- this.dataList.pureWeight = (
- this.dataList.pureWeight / 1000
- ).toFixed(2)
- if (!this.dataList.deductionWeight) {
- this.dataList.deductionWeight = 0
- }
- if (!this.dataList.deductionAmount) {
- this.dataList.deductionAmount = 0
- }
- this.dataList.deductionWeight = (
- this.dataList.deductionWeight / 1000
- ).toFixed(2)
- this.dataList.deductionAmount = Math.round(
- this.dataList.deductionAmount * 1000
- )
- addstorageputList(this.dataList)
- .toPromise()
- .then((response) => {
- this.dataList.grossWeight = Math.round(
- this.dataList.grossWeight * 1000
- )
- this.dataList.tare = Math.round(this.dataList.tare * 1000)
- this.dataList.netWeight = Math.round(
- this.dataList.netWeight * 1000
- )
- this.dataList.pureWeight = Math.round(
- this.dataList.pureWeight * 1000
- )
- this.dataList.deductionWeight = Math.round(
- this.dataList.deductionWeight * 1000
- )
- if (this.reader) {
- this.reader.cancel()
- }
- this.$message.success('提交成功')
- this.$confirm(`是否打印磅单`, {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- type: 'warning',
- }).then(() => {
- getPrintInfo({
- id: this.dataList.id,
- })
- .toPromise()
- .then((response) => {
- window.open(
- '../../../../static/weightCheckInOut.html?type=2&tableData=' +
- JSON.stringify(response)
- )
- })
- })
- this.$router
- .push({
- path: 'warehouseManagementList',
- })
- .catch(() => {
- return false
- })
- })
- .catch((response) => {
- this.dataList.grossWeight = Math.round(
- this.dataList.grossWeight * 1000
- )
- this.dataList.tare = Math.round(this.dataList.tare * 1000)
- this.dataList.netWeight = Math.round(
- this.dataList.netWeight * 1000
- )
- this.dataList.pureWeight = Math.round(
- this.dataList.pureWeight * 1000
- )
- this.dataList.deductionWeight = Math.round(
- this.dataList.deductionWeight * 1000
- )
- })
- } else {
- EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
- return false
- }
- })
- })
- .catch(() => {
- return false
- })
- },
- //暂存按钮
- returnWarehouse() {
- this.$refs.dataList.validate((valid) => {
- if (valid) {
- this.dataList.compId = localStorage.getItem('ws-pf_compId')
- this.dataList.statusFlag = 1
- addstorageputList(this.dataList)
- .toPromise()
- .then((response) => {
- this.$message.success('添加成功')
- this.$router.push({
- path: 'warehouseManagementList',
- })
- })
- } else {
- EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
- return false
- }
- })
- },
- tarechange(e) {
- this.tare = this.dataList.tare
- if (this.dataList.grossWeight && this.dataList.tare) {
- this.dataList.netWeight = Number(
- this.dataList.grossWeight - this.dataList.tare
- ).toFixed(2)
- }
- },
- grossWeightchange(e) {
- if (this.dataList.grossWeight && this.dataList.tare) {
- this.dataList.netWeight = Number(
- this.dataList.grossWeight - this.dataList.tare
- ).toFixed(2)
- }
- },
- selectgoodsName(e) {
- for (var i = 0; i < this.goodnameList.length; i++) {
- if (this.goodnameList[i].constValue == e) {
- this.dataList.goodsNameKey = this.goodnameList[i].constKey
- if (e == '玉米(潮粮)') {
- this.dataList.type = '潮粮'
- } else {
- this.dataList.type = '干粮'
- }
- }
- }
- },
- selectpackingMethod(e) {
- for (var i = 0; i < this.packtypeList.length; i++) {
- if (this.packtypeList[i].constValue == e) {
- this.dataList.packingMethodKey = this.packtypeList[i].constKey
- }
- }
- },
- selectstorageType(e) {
- for (var i = 0; i < this.storageType.length; i++) {
- if (this.storageType[i].constValue == e) {
- this.dataList.inOutTypeKey = this.storageType[i].constKey
- }
- }
- },
- handleClose() {
- this.accessoryTFs = false
- },
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`)
- this.pageSize = val
- this.getList()
- },
- handleCurrentChange(val) {
- this.currentPage = val
- console.log(`当前页: ${val}`)
- this.getList()
- },
- getList() {
- // 货名
- pullDown({
- constId: 'CON2',
- })
- .toPromise()
- .then((response) => {
- this.goodnameList = response
- })
- getReceiptTaskNo({
- flag: 2,
- warehouseName: this.deptBudgetList1.warehouseName,
- agentKey: localStorage.getItem('ws-pf_userId'),
- })
- .toPromise()
- .then((response) => {
- this.deptBudgetList2 = response
- })
- // 品级
- pullDown({
- constId: 'CON3',
- })
- .toPromise()
- .then((response) => {
- this.gradeList = response
- })
- // 类型
- if (this.$route.query.warehouseType == '1') {
- this.storageType = []
- pullDown({
- constId: 'CON5',
- })
- .toPromise()
- .then((response) => {
- // this.storageType = response
- for (let i = 0; i < response.length; i++) {
- if (
- response[i].constValue == '移库入库' ||
- response[i].constValue == '退库'
- ) {
- this.storageType.push(response[i])
- }
- }
- })
- } else if (this.$route.query.warehouseType == '2') {
- //临时仓库入库类型
- pullDown({
- constId: 'WARE1',
- })
- .toPromise()
- .then((response) => {
- this.storageType = response
- })
- //临时仓库出库类型
- pullDown({
- constId: 'WARE2',
- })
- .toPromise()
- .then((response) => {
- this.deliveryType = response
- })
- }
- //合同编号
- xialaNo({
- compId: localStorage.getItem('ws-pf_compId'),
- flag: 6,
- })
- .toPromise()
- .then((response) => {
- this.options1 = response
- this.outContractNo = response
- this.contractNoChange(this.dataList.inOutTaskNo)
- })
- //合同编号2
- xialaNo({
- compId: localStorage.getItem('ws-pf_compId'),
- flag: 7,
- })
- .toPromise()
- .then((response) => {
- for (let i = 0; i < response.length; i++) {
- if (this.dataList.contractNo == response[i].contractNo) {
- if (response[i].deliverType == '1') {
- this.carstatus = true
- } else {
- this.carstatus = false
- }
- }
- }
- this.outContractNo1 = response
- })
- //经办人
- getstaff({
- compId: localStorage.getItem('ws-pf_compId'),
- warehouseId: this.dataList.baseId,
- })
- .toPromise()
- .then((response) => {
- this.options = response
- this.qualityInspectorList = response
- this.staffList = response
- // this.agent = response
- })
- },
- selecttaskType(e) {
- for (var i = 0; i < this.taskTypeList.length; i++) {
- if (this.taskTypeList[i].value == e) {
- this.searchType = this.taskTypeList[i].type
- }
- }
- },
- fujian(row) {
- if (
- row.receiveAttachmentPath === null ||
- row.receiveAttachmentPath === ''
- ) {
- EventBus.$emit(
- 'warning',
- this.$t('system.noticeCircular.NoInformation')
- )
- } else {
- this.accessoryTFs = true
- }
- this.appendixIdss = row.receiveAttachmentPath
- },
- handleExamine(row) {
- this.$router.push({
- name: 'salesContractExamine',
- query: {
- id: row.id,
- },
- })
- },
- // 关闭 dialog时 处理文件url 初始化upload组件
- handleCloe() {
- this.dialogViewSpareMoney = false
- },
- history(row) {
- console.log(row)
- billoperatehis({
- id: row.id,
- })
- .toPromise()
- .then((response) => {
- this.historyList = response
- })
- },
- async exportlist() {
- const {
- data
- } = await export1({
- compId: localStorage.getItem('ws-pf_compId'),
- contractType: this.contractType,
- currentPage: this.currentPage,
- pageSize: this.pageSize,
- searchType: this.searchType,
- searchKeyWord: this.searchKeyWord,
- startDate: this.startDate,
- endDate: this.endDate,
- }, {}, {
- responseType: 'blob',
- }).toPromise()
- downloadFile({
- res: data,
- fileName: `${
- this.date.year + (this.date.month ? `-${this.date.month}` : '')
- }_采购合同`,
- type: 'xls',
- })
- },
- // deletecontract(){},
- //删除
- approve() {},
- listQuery() {},
- total() {},
- clearfiltQuery() {},
- selectCrtDuty() {},
- },
- }
- </script>
- <style lang="scss" scoped>
- /deep/.basicInformation {
- .ws-info-table {
- border: none;
- }
- .left {
- .el-form-item {
- width: 50%;
- // width: 33.3333%;
- border: none;
- .el-form-item__label {
- background: transparent;
- border: none;
- }
- .el-form-item__content {
- border: none;
- }
- }
- }
- .right {
- .el-form-item {
- width: 100%;
- // width: 33.3333%;
- border: none;
- .el-form-item__label {
- background: transparent;
- border: none;
- }
- .el-form-item__content {
- border: none;
- }
- }
- }
- }
- .title {
- position: relative;
- padding-left: 10px;
- }
- .title::before {
- content: '';
- display: inline-block;
- width: 5px;
- height: 30px;
- background: #5473e8;
- position: absolute;
- left: 0;
- }
- .el-form {
- padding: 0 10%;
- }
- .el-button--primary {
- background-color: #5878e8;
- border-color: #5878e8;
- }
- .el-col {
- background: #f6f7fc;
- }
- .bg-right {
- text-align: right;
- padding: 16px 20px;
- }
- .center {
- position: relative;
- top: 50px;
- width: 40%;
- height: 2000px;
- margin: 0 auto;
- }
- .inspector {
- width: 50%;
- }
- //质检员
- /deep/[data-v-58803672] .el-form-item__label {
- width: 60px;
- }
- [data-v-58803672] .el-form-item__label {
- width: 60px;
- }
- //选填
- /deep/.el-form-item {
- width: 50%;
- }
- /deep/.ws-info-table .el-form-item .el-form-item__label {
- text-align: center;
- }
- .deliverydate {
- display: inline-block;
- width: 10%;
- }
- .center {
- margin-top: -60px;
- width: 80%;
- }
- //仓位
- .position {
- width: 52px;
- height: 20px;
- background: #afb5cb;
- border-radius: 2px;
- font-size: 12px;
- font-family: PingFangSC-Medium, PingFang SC;
- color: #ffffff;
- line-height: 20px;
- }
- //表格文字
- /deep/.ws-info-table .el-form-item .el-form-item__label {
- text-align: left;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #8890b1;
- line-height: 16px;
- }
- //质检员
- .inspector .el-form-item__content {
- text-align: left;
- margin-left: 0px;
- }
- .small-title {
- position: relative;
- padding: 10px;
- font-weight: 600;
- }
- .small-title::before {
- position: absolute;
- content: '';
- display: block;
- background: #5473e8;
- width: 4px;
- height: 14px;
- left: 0px;
- top: 13px;
- }
- .top {
- width: 100%;
- background: black;
- color: #2aff7c;
- font-size: 32px;
- text-align: right;
- padding: 20px;
- border-radius: 10px;
- margin: 0 20px 0 20px;
- .car-type {
- text-align: left;
- }
- .kg-style {
- font-size: 30px;
- }
- }
- .weight {
- font-size: 68px;
- }
- //下面列表
- .neifor {
- width: 80%;
- background-color: #f6f7fc;
- }
- /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
- width: 35%;
- text-align: center;
- }
- /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
- width: 60%;
- background-color: #f6f7fc;
- }
- /deep/.neifor .el-input--small .el-input__inner {
- width: 100%;
- }
- .el-input__inner {
- width: 150px;
- }
- .balance-row {
- display: flex;
- margin: 20px 0;
- .left {
- width: 500px;
- margin-bottom: 0;
- }
- }
- </style>
|