1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741 |
- <template>
- <view :style='{"margin-bottom":InputEvent!=""?"200px":0}' ref="all-input">
- <view @click='hidden' class='wrap'>
- <view class='title_b'>基本信息</view>
- <view class="c-row ">
- <view class="title">入库类型</view>
- <view class="con-list">
- <view v-if='gridList.serviceManagementType==1'>贸易入库</view>
- <view v-if='gridList.serviceManagementType==3'>收购入库</view>
- </view>
- </view>
- <view v-if="flag!=3" class="c-row ">
- <view class="title">仓库</view>
- <view class="con-list">
- {{gridList.warehouseName}}
- </view>
- </view>
- <view class="c-row ">
- <view class="title">任务编号</view>
- <view class="con-list">
- <view >{{gridList.inOutTaskNo}}</view>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">已完成量</view>
- <view class="con-list">
- <view >{{gridList.donecount?gridList.donecount:'自动获取,不可编辑'}}</view>
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1&&gridList.inOutType!="移库入库"&&flag!=3||gridList.serviceManagementType==3' class="c-row ">
- <view class="title">合同编号</view>
- <view class="con-list">
- {{gridList.contractNo}}
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1&&gridList.inOutType=="移库入库"&&flag!=3' class="c-row ">
- <view class="title">移库编号</view>
- <view class="con-list">
- {{gridList.contractNo}}
- </view>
- </view>
- <view v-if='flag!=3' class="c-row ">
- <view class="title">业务编号</view>
- <view class="con-list">
- {{gridList.qualityNo}}
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
- <view class="title">成本</view>
- <view class="con-list">
- <view v-if='!coststatus'>{{gridList.cost?gridList.cost:'自动获取,不可编辑'}}</view>
- <view v-if='coststatus'>
- <input v-model='gridList.cost' placeholder="请输入成本" name="input" type="digit"></input>
- </view>
- </view>
- <button v-if='flag==4||flag==0' class='cu-btn bg-green shadow' @click="changecost">{{costtext}}</button>
- </view>
- <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
- <view class="title">运费</view>
- <view class="con-list flex">
- <view v-if='!freightstatus'>{{gridList.freight?gridList.freight:'自动获取,不可编辑'}}</view>
- <view v-if='freightstatus'>
- <input v-model='gridList.freight' placeholder="请输入运费" name="input" type="digit"></input>
- </view>
- </view>
- <button v-if='flag==4||flag==0' class='cu-btn bg-green shadow' @click="changefreight">{{freighttext}}</button>
- </view>
- <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
- <view class="title">扣款</view>
- <view class="con-list">
- <input v-if='flag==4||flag==0' v-model='gridList.deductionAmount' placeholder="请输入扣款" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
- <view class="title">入库类型</view>
- <view class="con-list">
- {{gridList.inOutType?gridList.inOutType:'自动获取,不可编辑'}}
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1&&flag!=3' class="c-row ">
- <view class="title">入库日期</view>
- <view class="con-list">
- <view v-if='flag==4||flag==0' @click='show5=true'>{{gridList.inOutDate?gridList.inOutDate:'请选择入库日期'}}</view>
- <view v-else @click='show5=true'>{{gridList.inOutDate?gridList.inOutDate:'请选择入库日期'}}</view>
- <u-picker @confirm='inOutDatepicker($event)' :params="params" v-model="show5"
- mode="time">
- </u-picker>
- </view>
- </view>
-
- <view v-if='gridList.serviceManagementType==3&&flag!=0' class="c-row ">
- <view class="title">客户</view>
- <view class="con-list">
- <view v-if='flag==4||flag==3' @click='gocustomer'>
- {{gridList.customerName}}({{gridList.customerPhone}})
- </view>
- <view v-else>
- {{gridList.customerName}}({{gridList.customerPhone}})
- </view>
- </view>
- </view>
- <!-- <view v-if='flag!=0' class="c-row "> -->
- <view class="c-row ">
- <view class="title">车牌号</view>
- <view class="con-list">
- <input :disabled="flag!=4&&flag!=3" v-model='gridList.carNumber' @click.stop="handleShowKeyboard" placeholder="请输入车牌号"
- name="input"></input>
- <master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false"
- :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
- <!-- <input :disabled='flag==1' v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input> -->
- </view>
- </view>
- <!-- <view v-if="gridList.paramType != '1'" class="c-row ">
- <view class="title">扣重比</view>
- <view class="con-list">
- <input :disabled='flag==1' v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
- name="input"></input>
- </view>
- </view>
- <view v-else class="c-row ">
- <view class="title">扣杂</view>
- <view class="con-list">
- <input :disabled='flag==1' v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂"
- @input="waterContentChange" name="input"></input>
- <input v-if='flag==0' value='未复检' disabled placeholder="复检扣杂" name="input"></input>
- <input v-else :disabled='flag!=1' v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂"
- name="input"></input>
- </view>
- </view> -->
- <view v-if='gridList.serviceManagementType==3&&flag!=3' class="c-row ">
- <view class="title">购粮性质</view>
- <view class="con-list">
- <input :disabled='flag==1' v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质"
- name="input"></input>
- </view>
- </view>
- <view v-if='flag!=3' class="c-row ">
- <view class="title">仓位号</view>
- <view class="con-list">
- <view v-if='flag!=1' @click='show=true'>{{gridList.binNumber?gridList.binNumber:'请选择仓位号'}}</view>
- <view v-else>{{gridList.binNumber}}</view>
- </view>
- </view>
- <view v-if='flag!=3' class="c-row ">
- <view class="title">囤位号</view>
- <view class="con-list">
- <input :disabled="flag!=4&&flag!=0" v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
- </view>
- </view>
- <view v-if='flag!=3' class="c-row ">
- <view class="title">货名</view>
- <view class="con-list">
- <!-- <view v-if="flag != '0'">
- {{gridList.goodsName}}
- </view> -->
- <view v-if='flag==4||flag==0'>{{gridList.goodsName}}</view>
- <view v-else>{{gridList.goodsName}}</view>
- <u-picker :range="goodsList" range-key="goodsName" @confirm='goodsPicker($event)'
- v-model="goodsName" mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-if='flag!=3' class="c-row ">
- <view class="title">类型</view>
- <view class="con-list">
- {{gridList.type}}
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1' class="c-row ">
- <view class="title">运输方式</view>
- <view class="con-list">
- <view v-if='flag==4||flag==0' @click='show7=true'>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
- <view v-else>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
- <u-picker :range="multiSelector" range-key="name" @confirm='outtypepicker($event,0)' v-model="show7"
- mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==3&&flag!=0' class="c-row ">
- <view class="title">运输方式</view>
- <view class="con-list">
- <view v-if='flag==4||flag==3' @click='show8=true'>{{outType?outType:'请选择运输方式'}}</view>
- <view v-else>{{outType?outType:'请选择运输方式'}}</view>
- <u-picker :range="multiSelector1" range-key="name" @confirm='outtypepicker($event,1)' v-model="show8"
- mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1&&flag!=3||gridList.serviceManagementType==3&&gridList.outType=="自运"&&flag!=3' class="c-row ">
- <view class="title">车队</view>
- <view class="con-list">
- <view v-if='flag==4||flag==0' @click='show6=true'>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
- <view v-else>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
- <u-picker @confirm='fleetpicker($event)' :range="fleetNameList" range-key="fleetName" v-model="show6"
- mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
- <view class="title">箱号-1</view>
- <view class="con-list">
- <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
- <view class="title">封号-1</view>
- <view class="con-list">
- <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
- <view class="title">箱号-2</view>
- <view class="con-list">
- <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
- <view class="title">封号-2</view>
- <view class="con-list">
- <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
- <view class="title">箱号-1</view>
- <view class="con-list">
- <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
- <view class="title">封号-1</view>
- <view class="con-list">
- <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
- <view class="title">箱号-2</view>
- <view class="con-list">
- <input :disabled='flag!=4&&flag!=0' v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.serviceManagementType==3&&flag!=0" class="c-row">
- <view class="title">封号-2</view>
- <view class="con-list">
- <input :disabled='flag!=4&&flag!=0' v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
- </view>
- </view>
-
- <view class="c-row-fj" v-if="flag==2||flag==1">
- <view style="margin: 0px 0px 30rpx 10rpx;">复检备注</view>
- <textarea class='textarea-style' v-model='gridList.reMemo' placeholder="请输入复检备注"
- maxlength="300"></textarea>
- </view>
- <view class="c-row" v-if="flag==1&&gridList.warehouseName=='鲅鱼圈金信库'">
- <view class="title">车型</view>
- <view class="con-list">
- <view @click='carstatus = true'>{{gridList.carModel?gridList.carModel:'请选择车型'}}</view>
- <u-picker :range="carModeList" range-key="constValue" @confirm='carPicker($event)'
- v-model="carstatus" mode="selector">
- </u-picker>
- </view>
- </view>
-
- </view>
- <view v-if='flag!=3' style='padding-bottom:500rpx;'>
- <view class='wrap'>
- <view style='margin-right:10px;' class='flex justify-between align-item-center'>
- <view class='title_b'>化验信息</view>
- <view v-if='flag==0||flag==4' class='flex justify-between align-item-center'>补录:<u-switch activeColor="#22C572"
- v-model="value" @change="change"></u-switch>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">等级</view>
- <view class="con-list">
- <u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
- mode="selector">
- </u-picker>
- <view v-if='flag!=1' @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
- <view v-else>{{gridList.grade}}</view>
- <u-picker :range="gradeList" range-key="value" @confirm='gradepicker1($event)' v-model="show2"
- mode="selector">
- </u-picker>
- <view v-if='flag==1' @click='show2=true'>{{gridList.reGrade?gridList.reGrade:'请选择等级'}}</view>
- <view v-if='flag==2'>{{gridList.reGrade}}</view>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">水分(%)</view>
- <view class="con-list">
- <MyNumberInput :myvalue="gridList.waterContent" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'waterContent'"
- @setValue="mykeywordset" v-if="InputEvent=='waterContent'"
- @Cancelword="Cancelword"
- @goNext="goNext('waterContent')"></MyNumberInput>
- <input v-else :disabled='flag==1' @click="SetInputKey('waterContent')" v-model='gridList.waterContent' placeholder="初检水分"
- @input="waterContentChange" type="digit" name="input"></input>
- <MyNumberInput :myvalue="gridList.reWaterContent" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'reWaterContent'"
- @setValue="mykeywordset" v-if="InputEvent=='reWaterContent'"
- @Cancelword="Cancelword"
- @goNext="goNext('reWaterContent')"></MyNumberInput>
- <input @click="SetInputKey('reWaterContent')" v-if="flag==1&&InputEvent!='reWaterContent'||flag==2&&InputEvent!='reWaterContent'" type="digit" v-model='gridList.reWaterContent' placeholder="复检水分"
- name="input"></input>
- </view>
- </view>
- <view class="c-row " v-if='gridList.goodsName!="大豆"'>
- <view class="title">容重(克/升)</view>
- <view class="con-list">
- <MyNumberInput :myvalue="gridList.bulkDensity" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'bulkDensity'"
- @setValue="mykeywordset" v-if="InputEvent=='bulkDensity'"
- @Cancelword="Cancelword"
- @goNext="goNext('bulkDensity')"></MyNumberInput>
- <input v-else @click="SetInputKey('bulkDensity')" :disabled='flag==1' type="digit" v-model='gridList.bulkDensity' placeholder="请输入容重"
- name="input" @input="obtainPrice"></input>
- <MyNumberInput :myvalue="gridList.reBulkDensity" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'reBulkDensity'"
- @setValue="mykeywordset" v-if="InputEvent=='reBulkDensity'"
- @Cancelword="Cancelword"
- @goNext="goNext('reBulkDensity')"></MyNumberInput>
- <input @click="SetInputKey('reBulkDensity')" v-if="flag==1&&InputEvent!='reBulkDensity'||flag==2&&InputEvent!='reBulkDensity'" type="digit" v-model='gridList.reBulkDensity' placeholder="请输入容重"
- name="input"></input>
- </view>
- </view>
- <view class="c-row" v-else>
- <view class="title">蛋白</view>
- <view class="con-list">
- <MyNumberInput :myvalue="gridList.protein" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'protein'"
- @setValue="mykeywordset" v-if="InputEvent=='protein'"
- @Cancelword="Cancelword"
- @goNext="goNext('protein')"></MyNumberInput>
- <input v-else @click="SetInputKey('protein')" :disabled='flag==1' type="digit" v-model='gridList.protein' placeholder="请输入蛋白"
- name="input" @input="obtainPrice"></input>
- <MyNumberInput :myvalue="gridList.reProtein" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'reProtein'"
- @setValue="mykeywordset" v-if="InputEvent=='reProtein'"
- @Cancelword="Cancelword"
- @goNext="goNext('reProtein')"></MyNumberInput>
- <input @click="SetInputKey('reProtein')" v-if="flag==1&&InputEvent!='reProtein'||flag==2&&InputEvent!='reProtein'" type="digit" v-model='gridList.reProtein' placeholder="请输入蛋白"
- name="input"></input>
- </view>
- </view>
- <view class="c-row " v-if='gridList.goodsName!="大豆"'>
- <view class="title">不完善粒(%)</view>
- <view class="con-list">
- <MyNumberInput :myvalue="gridList.imperfectGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'imperfectGrain'"
- @setValue="mykeywordset" v-if="InputEvent=='imperfectGrain'"
- @Cancelword="Cancelword"
- @goNext="goNext('imperfectGrain')"></MyNumberInput>
- <input v-else @click="SetInputKey('imperfectGrain')" :disabled='flag==1' type="digit" v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
- name="input"></input>
- <MyNumberInput :myvalue="gridList.reImperfectGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'reImperfectGrain'"
- @setValue="mykeywordset" v-if="InputEvent=='reImperfectGrain'"
- @Cancelword="Cancelword"
- @goNext="goNext('reImperfectGrain')"></MyNumberInput>
- <input @click="SetInputKey('reImperfectGrain')" v-if="flag==1&&InputEvent!='reImperfectGrain'||flag==2&&InputEvent!='reImperfectGrain'" type="digit" v-model='gridList.reImperfectGrain' placeholder="请输入不完整粒占比"
- name="input"></input>
- </view>
- </view>
- <view class="c-row" v-else>
- <view class="title">完整粒率(%)</view>
- <view class="con-list">
- <MyNumberInput :myvalue="gridList.completeGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'completeGrain'"
- @setValue="mykeywordset" v-if="InputEvent=='completeGrain'"
- @Cancelword="Cancelword"
- @goNext="goNext('completeGrain')"></MyNumberInput>
- <input v-else @click="SetInputKey('completeGrain')" :disabled='flag==1' type="digit" v-model='gridList.completeGrain' placeholder="请输入完整粒率占比"
- name="input"></input>
- <MyNumberInput :myvalue="gridList.reCompleteGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'reCompleteGrain'"
- @setValue="mykeywordset" v-if="InputEvent=='reCompleteGrain'"
- @Cancelword="Cancelword"
- @goNext="goNext('reCompleteGrain')"></MyNumberInput>
- <input @click="SetInputKey('reCompleteGrain')" v-if="flag==1&&InputEvent!='reCompleteGrain'||flag==2&&InputEvent!='reCompleteGrain'" type="digit" v-model='gridList.reCompleteGrain' placeholder="请输入完整粒率占比"
- name="input"></input>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">杂质(%)</view>
- <view class="con-list">
- <MyNumberInput :myvalue="gridList.impurity" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'impurity'"
- @setValue="mykeywordset" v-if="InputEvent=='impurity'"
- @Cancelword="Cancelword"
- @goNext="goNext('impurity')"></MyNumberInput>
- <input v-else @click="SetInputKey('impurity')" :disabled='flag==1' type="digit" v-model='gridList.impurity' placeholder="请输入杂质占比"
- name="input"></input>
- <MyNumberInput :myvalue="gridList.reImpurity" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'reImpurity'"
- @setValue="mykeywordset" v-if="InputEvent=='reImpurity'"
- @Cancelword="Cancelword"
- @goNext="goNext('reImpurity')"></MyNumberInput>
- <input @click="SetInputKey('reImpurity')" v-if="flag==1&&InputEvent!='reImpurity'||flag==2&&InputEvent!='reImpurity'" type="digit" v-model='gridList.reImpurity' placeholder="请输入杂质占比"
- name="input"></input>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">霉变粒(%)</view>
- <view class="con-list">
- <MyNumberInput :myvalue="gridList.mildewGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'mildewGrain'"
- @setValue="mykeywordset" v-if="InputEvent=='mildewGrain'"
- @Cancelword="Cancelword"
- @goNext="goNext('mildewGrain')"></MyNumberInput>
- <input v-else @click="SetInputKey('mildewGrain')" :disabled='flag==1' type="digit" v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
- name="input"></input>
- <MyNumberInput :myvalue="gridList.reMildewGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'reMildewGrain'"
- @setValue="mykeywordset" v-if="InputEvent=='reMildewGrain'"
- @Cancelword="Cancelword"
- @goNext="goNext('reMildewGrain')"></MyNumberInput>
- <input @click="SetInputKey('reMildewGrain')" v-if="flag==1&&InputEvent!='reMildewGrain'||flag==2&&InputEvent!='reMildewGrain'" type="digit" v-model='gridList.reMildewGrain' placeholder="请输入霉变粒占比"
- name="input"></input>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">热损伤(%)</view>
- <view class="con-list">
- <MyNumberInput :myvalue="gridList.jiaorenli" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'jiaorenli'"
- @setValue="mykeywordset" v-if="InputEvent=='jiaorenli'"
- @Cancelword="Cancelword"
- @goNext="goNext('jiaorenli')"></MyNumberInput>
- <input v-else @click="SetInputKey('jiaorenli')" :disabled='flag==1' type="digit" v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
- name="input"></input>
- <MyNumberInput :myvalue="gridList.reJiaorenli" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'reJiaorenli'"
- @setValue="mykeywordset" v-if="InputEvent=='reJiaorenli'"
- @Cancelword="Cancelword"
- @goNext="goNext('reJiaorenli')"></MyNumberInput>
- <input @click="SetInputKey('reJiaorenli')" v-if="flag==1&&InputEvent!='reJiaorenli'||flag==2&&InputEvent!='reJiaorenli'" type="digit" v-model='gridList.reJiaorenli' placeholder="请输入热损伤占比"
- name="input"></input>
- <!-- <input v-model='gridList.jiaorenli' @click.stop="handleShowKeyboard1":disabled="true" placeholder="请输入热损伤占比" name="input"></input> -->
- </view>
- </view>
- <view class="c-row" v-if="gridList.goodsName == '大豆'">
- <view class="title">转基因</view>
- <view class="con-list">
- <view @click="transgeneShow=true">{{gridList.transgene}}</view>
- <!-- 转基因 -->
- <u-picker :range="transgeneList" range-key="value" @confirm='transgeneClick($event)' v-model="transgeneShow"
- mode="selector">
- </u-picker>
- <view @click="transgeneShow=true">{{gridList.reTransgene?gridList.reTransgene:"请选择是否转基因"}}</view>
- <!-- 转基因 -->
- <u-picker :range="transgeneList" range-key="value" @confirm='transgeneClick1($event)' v-model="transgeneShow"
- mode="selector">
- </u-picker>
- </view>
- </view>
- <view class="c-row" v-if="gridList.goodsName == '大豆'">
- <view class="title">色泽/气味</view>
- <view class="con-list">
- <div >{{gridList.colorLustre}}</div>
- <u-picker :range="colorLustreList" range-key="value" @confirm='colorLustreClick($event)' v-model="colorLustreShow"
- mode="selector">
- </u-picker>
-
- <div @click="colorLustreShow = true">{{gridList.reColorLustre?gridList.reColorLustre:"请选择色泽/气味是否正常"}}</div>
- <u-picker :range="colorLustreList" range-key="value" @confirm='colorLustreClick1($event)' v-model="colorLustreShow"
- mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
- class="c-row">
- <view class="title">水分增价(元/吨)</view>
- <view class="con-list">
- <input v-model='gridList.waterPriceIncrease' @focus="pricefocus($event,1)" @blur="priceblur($event,1)" @input='deductionchange'
- placeholder="请输入水分增价" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
- class="c-row">
- <view class="title">水分扣价(元/吨)</view>
- <view class="con-list">
- <input v-model='gridList.waterPriceDeduction' @focus="pricefocus($event,2)" @blur="priceblur($event,2)" @input='deductionchange'
- placeholder="请输入水分扣价" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
- class="c-row">
- <view class="title">质量增价(元/吨)</view>
- <view class="con-list">
- <input v-model='gridList.qualityPriceIncrease' @focus="pricefocus($event,3)" @blur="priceblur($event,3)" @input='deductionchange'
- placeholder="请输入质量增价" name="input" type="digit"></input>
- </view>
- </view>
-
- <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
- class="c-row">
- <view class="title">质量扣价(元/吨)</view>
- <view class="con-list">
- <input v-model='gridList.qualityPriceDeduction' @focus="pricefocus($event,4)" @blur="priceblur($event,4)" @input='deductionchange'
- placeholder="请输入质量扣价" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.type == '潮粮'&&gridList.serviceManagementType==3&&flag!=3" class="c-row">
- <view class="title">净重单价(元/公斤)</view>
- <view class="con-list">
- <input :disabled='flag==1&&pricedisabled' v-model='gridList.tidalGrainPrice' @blur='inputprice' placeholder="自动获取,不可编辑"
- name="input"></input>
- </view>
- <!-- <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button> -->
- </view>
- <view v-if="gridList.type == '干粮'&&gridList.serviceManagementType==3&&flag!=3" class="c-row">
- <view class="title">干粮单价(元/公斤)</view>
- <view class="con-list">
- <input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' type="digit" @blur='inputprice' placeholder="请输入干粮单价" name="input"></input>
- </view>
- <!-- <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button> -->
- </view>
- <view v-if="gridList.type == '干粮'&&gridList.serviceManagementType==1&&flag!=3" class="c-row">
- <view class="title">干粮单价(元/公斤)</view>
- <view class="con-list">
- <input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' type="digit" @blur='inputprice' placeholder="请输入干粮单价" name="input"></input>
- </view>
- </view>
- </view>
- </view>
- <view class="footer">
- <view v-if='flag==1' @click='confirmInfo' class="button">确认初检信息</view>
- <view @click='submit' class="button">提交</view>
- </view>
- <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
- :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
- :showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
- <u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
- <view class="buns_item">
- <view class="but_css" @click="print">打印小票</view>
- <view class="but_css" @click="close">返回</view>
- </view>
- </u-popup>
- <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
- v-model="show" mode="selector">
- </u-picker>
- </view>
- </template>
- <script>
- const Equ_List=['waterContent','bulkDensity','imperfectGrain','impurity','mildewGrain','jiaorenli'];
- const Equ_List1=['reWaterContent','reBulkDensity','reImperfectGrain','reImpurity','reMildewGrain','reJiaorenli'];
- import dragButton from "@/components/drag-button/drag-button.vue";
- import keyboard from "@/components/master-keyboard/master-keyboard.vue";
- import MyNumberInput from "@/components/MyNumberInput.vue";
- import {
- mapState
- } from 'vuex';
- let startY = 0,
- moveY = 0,
- pageAtTop = true;
- export default {
- components: {
- dragButton,
- keyboard,
- MyNumberInput
- },
- data() {
- return {
- isShowPrint: false,
- inputShow: false,
- modalName: '',
- mycarStyle: '',
- feild: undefined,
- id: 0,
- show: false,
- show2:false,
- show4:false,
- show5:false,
- show7:false,
- show8:false,
- pricedisabled:false,
- multiSelector1:[{name:'他运',value:'他运'}],
- outType:'',
- selector: [],
- show1: false,
- pricetext:'锁定',
- goodsName: false,
- carstatus: false,
- params:{year: true,
- month: true,
- day: true,},
- inputContent: '',
- multiSelector: [{
- name: '汽运',
- value: '0',
- },
- {
- name: '火运',
- value: '1',
- },
- {
- name: '集装箱船',
- value: '2',
- },
- {
- name: '散船',
- value: '3',
- },
- ],
- coverTransform: 'translateY(0px)',
- coverTransition: '0s',
- moving: false,
- footprintList: [],
- zjid:'',
- searchKeyWord: '',
- isVip: false,
- flag: 0,
- freightstatus:false,
- coststatus:false,
- freighttext:'手动填写',
- costtext:'手动填写',
- userInfoTmp: [],
- inputStatus: 'none',
- carInfo: [],
- gridCol: 4,
- pageSize: 10,
- currentPage: 1,
- gridBorder: false,
- headUrl: "../../static/img/myimg/YongHu@3x.png",
- userphone: "",
- username: "请更改昵称",
- gridList: {
- natureOfGrainPurchase: '贸易粮',
- type: '潮粮',
- tidalGrainPrice: '',
- dryGrainPrice: '',
- carNumber: '',
- carModel: '',
- serviceManagementType:'3'
- },
- managementType: '',
- warehouseName: '',
- warehouseList: [],
- InputEvent:'',
- bottomHeight:'10rpx',
- MykeywordShow:false,
- showTran: true,
- companyId: 1,
- current: 4,
- value: false,
- carModeList: [],
- fleetNameList:[],
- gradeList: [{
- key: 1,
- value: '一等品'
- },
- {
- key: 2,
- value: '二等品'
- },
- {
- key: 3,
- value: '三等品'
- },
- {
- key: 4,
- value: '等外'
- },
- ],
- cangid: '',
- goodsList: [],
- taskNolist:[],
- dryGrainPrice:0,
- tidalGrainPrice:0,
- isShowAlert: false,
- content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
- transgeneShow:false,
- transgeneList:[{value:'非转基因'},{value:'转基因'}],
- colorLustreShow : false,
- colorLustreList:[{value:'正常'},{value:'异常'}]
- }
- },
- // #ifndef MP
- onNavigationBarButtonTap(e) {
- const index = e.index;
- if (index === 0) {
- this.navTo('/pages/set/set');
- } else if (index === 1) {
- // #ifdef APP-PLUS
- const pages = getCurrentPages();
- const page = pages[pages.length - 1];
- const currentWebview = page.$getAppWebview();
- currentWebview.hideTitleNViewButtonRedDot({
- index
- });
- // #endif
- uni.navigateTo({
- url: '/pages/notice/notice'
- })
- }
- },
- // #endif
- computed: {
- ...mapState(['hasLogin', 'userInfo']),
- // 手机号中间4位加*
- starUserphone() {
- let reg = /^(\d{3})\d{4}(\d{4})$/;
- if (this.userphone) {
- return this.userphone.replace(reg, "$1****$2");
- }
- }
- },
- onLoad(options) {
- this.id = options.id
- this.flag = options.flag
- this.cangid = options.cangid
- this.warehouseName=options.warehouseName
- this.managementType = options.managementType
-
- console.log(this.flag)
- var that = this
-
- uni.showLoading({
- title:"加载中"
- })
- this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
- id: this.id
- }).then(res => {
- uni.hideLoading()
- if (res.data.data) {
- let data = res.data.data
- if (data.supplementaryRecording == 1) {
- that.value = true
- } else {
- that.value = false
- }
- that.gridList = data
-
- if(that.gridList.type=='干粮'){
- if (this.gridList.goodsName &&
- this.gridList.bulkDensity &&
- this.cangid) {
- this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
- warehouseId: this.cangid,
- goodsName: this.gridList.goodsName,
- bulkDensity:this.gridList.bulkDensity
- }).then(res => {
- if(res.data.data != 0){
- this.gridList.dryGrainPrice = res.data.data
- this.dryGrainPrice = res.data.data
- this.deductionchange()
- }
- })
- }
- }else if(that.gridList.type=='潮粮'){
- if (
- this.gridList.goodsName &&
- this.gridList.waterContent &&
- this.gridList.grade
- ) {
- console.log('123123')
- this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
- warehouseId: this.cangid,
- goodsName: this.gridList.goodsName,
- waterContent: this.gridList.waterContent,
- grade: this.gridList.grade,
- }).then(res => {
-
- if (that.gridList.paramType == '1') {
- // console.log(that.gridList)
- if(that.gridList.buckleMiscellaneous){
- that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
- .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
- .dryGrainPrice)).toFixed(4)
- that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
- .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
- .dryGrainPrice)).toFixed(4)
- }
- if (!that.gridList.tidalGrainPrice) {
- that.gridList.tidalGrainPrice = ''
- }
- } else {
- that.gridList.tidalGrainPrice = res.data.data
- that.tidalGrainPrice = res.data.data
- }
- this.deductionchange()
- })
- }
- }
- // if(that.gridList.dryGrainPrice){
- // that.dryGrainPrice=that.gridList.dryGrainPrice
- // }
- // if(that.gridList.tidalGrainPrice){
- // that.tidalGrainPrice=that.gridList.tidalGrainPrice
- // }
- if(!that.gridList.reGrade){
- that.gridList.reGrade=that.gridList.grade
- }
- if(!that.gridList.reWaterContent){
- that.gridList.reWaterContent=that.gridList.waterContent
- }
- if(!that.gridList.reBulkDensity){
- that.gridList.reBulkDensity=that.gridList.bulkDensity
- }
- if(!that.gridList.reImperfectGrain){
- that.gridList.reImperfectGrain=that.gridList.imperfectGrain
- }
- if(!that.gridList.reImpurity){
- that.gridList.reImpurity=that.gridList.impurity
- }
- if(!that.gridList.reMildewGrain){
- that.gridList.reMildewGrain=that.gridList.mildewGrain
- }
- if(!that.gridList.reJiaorenli){
- that.gridList.reJiaorenli=that.gridList.jiaorenli
- }
- if(this.gridList.outType&&this.gridList.serviceManagementType==3){
- this.outType=this.gridList.outType
- }
- that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
- id: this.cangid
- }).then(res => {
- that.warehouseList = res.data.data.warehousePositionInfoList
- })
- //质检货名下拉
- this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
- warehouseId: this.cangid
- }).then(res => {
- if (res.data.data) {
- that.goodsList = res.data.data
- if (that.goodsList.length > 0) {
- if(!that.gridList.goodsName){
- that.gridList.goodsName = that.goodsList[0].goodsName
- }
- uni.setStorageSync('purchasePriceList', that.goodsList)
- that.purchasePriceList = uni.getStorageSync('purchasePriceList')
- }
- }
- else if(res.data.code != 200 && that.gridList.serviceManagementType==3){
- uni.showModal({
- content:res.data.message,
- showCancel:false
- })
- }
-
- })
- }
- })
- this.$api.doRequest('get', 'commonSysParameter/getInfo', {
- constId: 'QUA1'
- }).then(res => {
- if (res.data.data) {
- that.carModeList = res.data.data
- }
- })
- this.gridList.grade = this.gradeList[2].value
- this.gridList.gradeKey = this.gradeList[2].key
- },
- onShow() {
- this.multiSelector1=[{name:'他运',value:'他运'}]
- this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
- warehouseName:this.warehouseName
- }).then(res => {
- // console.log(res)
- if(res.data.data.contractManagementInfoList){
- for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
- res.data.data.contractMangementInfoList[i].name='自运 ('+
- res.data.data.contractMangementInfoList[i].contractNo+' '+res.data.data.contractMangementInfoList[i].seller+')'
- this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
- }
- }else{
- this.multiSelector1=[{name:'他运',value:'他运'}]
- }
- // this.taskNolist=res.data.data
- })
- // uni.showLoading({title: '加载中'})
- // this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
- // flag: 2,
- // warehouseName:this.warehouseName
- // }).then(res => {
- // console.log(res)
- // uni.hideLoading();
- // this.taskNolist=res.data.data
- // })
- let _kh = uni.getStorageSync('isClick')
- if (uni.getStorageSync('checkcustomer') && _kh) {
- let _customerInfo = uni.getStorageSync('checkcustomer')
- if (_customerInfo.shipperName) {
- this.gridList.identityId = _customerInfo.id
- //点击登记客户
- this.gridList.customerName = _customerInfo.shipperName
- this.gridList.customerPhone = _customerInfo.shipperPhone
- this.gridList.carNumber = _customerInfo.carNo
- } else {
- //点击搜索客户
- this.gridList.customerName = _customerInfo.customerName
- this.gridList.customerPhone = _customerInfo.customerPhone
- }
- this.gridList.customerNumberCard = _customerInfo.customerNumberCard
- }
- },
- methods: {
- colorLustreClick(e){
- this.gridList.colorLustre = this.colorLustreList[e[0]].value
- },
- colorLustreClick1(e){
- this.gridList.reColorLustre = this.colorLustreList[e[0]].value
- },
- transgeneClick(e){
- this.gridList.transgene = this.transgeneList[e[0]].value
- },
- transgeneClick1(e){
- this.gridList.reTransgene = this.transgeneList[e[0]].value
- },
- Cancelword(){
- this.bottomHeight = '10rpx';
- this.MykeywordShow =false;
- this.InputEvent = '';
- },
- goNext(val){
- if(this.flag==0||this.flag==3||this.flag==4){
- var inputList = Equ_List;
- }else{
- var inputList = Equ_List1;
- }
- var index = inputList.indexOf(val);
- this.setScrollTops(val);
- if(index<inputList.length-1){
- this.InputEvent = inputList[index+1];
- }else{
- this.InputEvent=''
- this.bottomHeight = '10rpx';
- this.MykeywordShow = false;
- }
- },
- mykeywordset(datatxt){
- var arr = JSON.parse(datatxt);
- this.gridList[arr.even] = arr.value;
- if(arr.even=='waterContent'){
- this.waterContentChange()
- }else if(arr.even=='bulkDensity'){
- this.obtainPrice()
- }
- },
- SetInputKey(even){
- uni.hideKeyboard();
- this.InputEvent = even;
- this.setScrollTops(even);
- if(!this.MykeywordShow){
- this.bottomHeight = '320rpx';
- this.MykeywordShow = true;
- }
- },
- setScrollTops(even){
- if(this.flag==0||this.flag==3||this.flag==4){
- var inputList = Equ_List;
- }else{
- var inputList = Equ_List1;
- }
- var index = inputList.indexOf(even);
- this.viewTop = (index + 1) * 60 + 100;
- },
- pricefocus(e,status){
- console.log(e)
- if(status==1){
- if(e.detail.value==0){
- this.gridList.waterPriceIncrease=''
-
- }
- }else if(status==2){
- if(e.detail.value==0){
- this.gridList.waterPriceDeduction=''
-
- }
-
- }else if(status==3){
- if(e.detail.value==0){
- this.gridList.qualityPriceIncrease=''
-
- }
-
- }else if(status==4){
- if(e.detail.value==0){
- this.gridList.qualityPriceDeduction=''
-
- }
-
- }
-
- },
- priceblur(e,status){
- console.log(e)
- if(status==1){
- if(e.detail.value==''){
- this.gridList.waterPriceIncrease=0
-
- }
- }else if(status==2){
- if(e.detail.value==''){
- this.gridList.waterPriceDeduction=0
-
- }
-
- }else if(status==3){
- if(e.detail.value==''){
- this.gridList.qualityPriceIncrease=0
-
- }
-
- }else if(status==4){
- if(e.detail.value==''){
- this.gridList.qualityPriceDeduction=0
-
- }
-
- }
-
- },
- deductionchange(){
- console.log(this.gridList.type,this.tidalGrainPrice,
- Number(this.tidalGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4))
- if(this.gridList.type=='干粮'){
- if(this.dryGrainPrice!=''){
- console.log(Number(this.dryGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)),Number(this.dryGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(2))
- this.gridList.dryGrainPrice=Number(this.dryGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4)
- }
-
- }else if(this.gridList.type=='潮粮'){
- if(this.tidalGrainPrice!=''){
- this.gridList.tidalGrainPrice=Number(this.tidalGrainPrice+(this.gridList.waterPriceIncrease/1000)-(this.gridList.waterPriceDeduction/1000)+(this.gridList.qualityPriceIncrease/1000)-(this.gridList.qualityPriceDeduction/1000)).toFixed(4)
- }
-
- }
- this.$forceUpdate()
- },
- obtainPrice(){//根据容重获取价格
- if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
- // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
- this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
- warehouseId: this.cangid,
- goodsName: this.gridList.goodsName,
- bulkDensity:this.gridList.bulkDensity
- }).then(res => {
- if(res.data.data != 0){
- this.gridList.dryGrainPrice = res.data.data
- this.dryGrainPrice = res.data.data
- this.gridList.waterPriceIncrease=0
- this.gridList.waterPriceDeduction=0
- this.gridList.qualityPriceIncrease=0
- this.gridList.qualityPriceDeduction=0
- }
- })
- // }
- }
- },
- changeprice(){
- if(this.pricetext=='解锁'){
- this.pricedisabled=false
- this.pricetext='锁定'
- }else{
- this.pricedisabled=true
- this.pricetext='解锁'
- }
- },
- inputprice(){
- if(this.pricetext=='锁定'){
- this.pricedisabled=true
-
- this.pricetext='解锁'
- }
- },
- inOutDatepicker(e){
- this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
- console.log(e)
- },
- fleetpicker(e){
- this.gridList.fleet=this.fleetNameList[e[0]].fleetName
- },
- changefreight(){
- this.freightstatus=!this.freightstatus
- if(this.freightstatus){
- this.freighttext='自动获取'
- }else{
- this.freighttext='手动填写'
- }
- },
- changecost(){
- this.coststatus=!this.coststatus
- if(this.coststatus){
- this.costtext='自动获取'
- }else{
- this.costtext='手动填写'
- }
- },
- gocustomer() {
- uni.navigateTo({
- url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
- .warehouseName + '&goodsName=' + this.gridList.goodsName + '&status=edit'
- })
- },
- print() {
- uni.navigateTo({
- url: '/pages/erpbusiness/bleConnect'
- })
- },
- close() {
- this.isShowPrint = false
- uni.navigateBack({})
- },
- // focusConfig(type){
- // console.log('childclick',type)
- // // 0是上一项
- // if(type==0){
- // }else{}
- // },
- hidden() {
- this.$refs.keyboard.open(false)
- },
- carPicker(e) {
- this.gridList.carModel = this.carModeList[e[0]].constValue
- },
- handleShowKeyboard() {
- if (this.flag == 0) {
- if (this.$refs.keyboard.open) {
- this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
- } else {
- this.$refs.keyboard[0].open(true)
- }
- }
- },
- handleShowKeyboard1() {
- if (this.flag == 0) {
- if (this.$refs.keyboard1.open) {
- this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
- } else {
- this.$refs.keyboard1[0].open(true)
- }
- }
- },
- handleClick(e) {
- this.gridList.carNumber = e.value //键盘输入值
- },
- handleClick1(e) {
- this.gridList.jiaorenli = e.value //键盘输入值
- },
- change(e) {
- if (e) {
- this.gridList.supplementaryRecording = 1
- } else {
- this.gridList.supplementaryRecording = 0
- }
- },
- confirmInfo() {
- this.isShowAlert = true
- },
- alertBtn() {
- this.gridList.agent=this.userInfo.userName;
- var that = this
- that.gridList.reWaterContent = that.gridList.waterContent
- if (that.gridList.buckleMiscellaneous) {
- that.gridList.reBuckleMiscellaneous = that.gridList.buckleMiscellaneous
- }
- that.gridList.flag = 1
- if(this.flag==3){
- this.gridList.statusFlag=7
- }else if(this.flag==4||this.flag==0){
- this.gridList.statusFlag=0
- }
- else if(this.flag==1){
- this.gridList.statusFlag=1
- }else if(this.flag==2){
- this.gridList.statusFlag=2
- }
- this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(
- res => {
- if (res.data.code == "200") {
- that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {
- id: that.gridList.id,
- flag: 2
- }).then(res => {
- if (res.data.code == "200") {
- that.$api.msg('提交成功!')
- setTimeout(function() {
- uni.navigateBack({delta:Int16Array})
- }, 1000)
- } else {
- that.$api.msg('提交失败')
- }
- })
- } else {
- that.$api.msg('提交失败')
- }
- })
- },
- waterContentChange() {
- var that = this
- if (this.gridList.goodsName) {
- for (var i = 0; i < this.purchasePriceList.length; i++) {
- if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
- this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
- this.gridList.paramType = this.purchasePriceList[i].paramType
- }
- }
- }
- console.log(this.gridList.serviceManagementType)
- // debugger
- if(this.gridList.serviceManagementType != 3){ //非收购入库 不需在获取价格
- return
- }
- if (this.gridList.goodsName && this.cangid) {
- if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
- this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
- warehouseId: this.cangid,
- goodsName: this.gridList.goodsName
- }).then(res => {
- that.gridList.dryGrainPrice = res.data.data
- that.dryGrainPrice = res.data.data
-
- })
- }
- }
- that.gridList.waterPriceIncrease=0
- that.gridList.waterPriceDeduction=0
- that.gridList.qualityPriceIncrease=0
- that.gridList.qualityPriceDeduction=0
- //潮粮单价改变事件
- if (
- this.gridList.goodsName &&
- this.gridList.waterContent &&
- this.gridList.grade
- ) {
- console.log('123123')
-
- uni.showLoading({
- title:"加载中"
- })
- this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
- warehouseId: this.cangid,
- goodsName: this.gridList.goodsName,
- waterContent: this.gridList.waterContent,
- grade: this.gridList.grade,
- }).then(res => {
-
- if (that.gridList.paramType == '1') {
- // console.log(that.gridList)
- if(that.gridList.buckleMiscellaneous){
- that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
- .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
- .dryGrainPrice)).toFixed(4)
- that.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
- .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
- .dryGrainPrice)).toFixed(4)
- }
- if (!that.gridList.tidalGrainPrice) {
- that.gridList.tidalGrainPrice = ''
- }
- if(that.gridList.type == '干粮'){
- that.gridList.dryGrainPrice = res.data.data
- that.dryGrainPrice = that.gridList.dryGrainPrice
- }
- } else {
- that.gridList.tidalGrainPrice = res.data.data
- if(that.gridList.type == '干粮'){
- that.gridList.dryGrainPrice = res.data.data
- that.dryGrainPrice = that.gridList.dryGrainPrice
- }else{
- that.gridList.tidalGrainPrice = res.data.data
- that.tidalGrainPrice = that.gridList.tidalGrainPrice
- }
- }
- // that.tidalGrainPrice = that.gridList.tidalGrainPrice
- uni.hideLoading()
- })
- }
-
- },
- goodsPicker(e) {
- this.gridList.goodsName = this.goodsList[e[0]].goodsName
- },
- submit() {
- this.$delete(this.gridList,'status')
- this.gridList.agent=this.userInfo.userName;
- this.gridList.waterContent = Number(this.gridList.waterContent)
- // if(!this.$u.test.isEmpty(this.gridList.tidalGrainPrice)){
- // this.gridList.tidalGrainPrice=''
- // return
- // }
- if(this.flag==3){
- this.gridList.statusFlag=7
- }else if(this.flag==4||this.flag==0){
- this.gridList.statusFlag=0
- }
- else if(this.flag==1){
- this.gridList.statusFlag=1
- }else if(this.flag==2){
- this.gridList.statusFlag=2
- }
-
- if(this.gridList.serviceManagementType==3){
- if(this.outType){
- this.gridList.outType=this.outType
- }
- }else{
- this.gridList.customerName = ''
- }
-
- var text=''
- if(this.utils.getCurrectRoles('acquisitionQuality.qview')&&!this.utils.getCurrectRoles('acquisitionQuality.initial')){
- text="确定提交钎样信息?"
- if(this.flag==3||this.flag==4||this.flag==0){
- this.gridList.brazer=1
- }
-
- }else{
- text="确定提交质检信息?"
- if(this.flag==3||this.flag==4||this.flag==0){
- this.gridList.brazer=0
- }
- }
- if(this.flag==4){
- this.gridList.flag = 0
- }else{
- this.gridList.flag = this.flag
- }
-
- // if(this.flag==2){
- // this.gridList.reInspector=this.userInfo.userName
- // }
- if (!this.gridList.qualityNo) {
- this.$api.msg('编号不能为空')
- return
- }
- var that = this
- if(this.flag==4||this.flag==0){
- if (!this.gridList.binNumber) {
- this.$api.msg('仓位不能为空')
- return
- }
- }
-
-
- if(this.gridList.serviceManagementType==3){
- if (!this.gridList.customerName) {
- this.$api.msg('客户不能为空')
- return
- }
- }
-
- // if (!this.gridList.storageTagNo) {
- // this.$api.msg('囤位号不能为空')
- // return
- // }
- // if (this.gridList.storageTagNo.length > 10) {
- // this.$api.msg('囤位号不能为空')
- // return
- // }
- if (!this.gridList.carNumber) {
- this.$api.msg('车牌号不能为空')
- return
- }
- if (this.gridList.carNumber.length > 7) {
- this.$api.msg('车牌号输入错误')
- return
- }
- if (!this.gridList.goodsName) {
- this.$api.msg('货名不能为空')
- return
- }
- if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
- this.gridList.buckleWeightRatio > 2) {
- this.$api.msg('扣重比输入错误')
- return
- }
- if (
- this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
- String(this.gridList.buckleWeightRatio).length -
- (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
- this.$api.msg('扣重比输入错误')
- return
- }
- if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
- 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
- this.$api.msg('初检扣杂输入错误')
- return
- }
- if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
- .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
- this.$api.msg('复检扣杂输入错误')
- return
- }
- if (!this.gridList.type) {
- this.$api.msg('类型不能为空')
- return
- }
- if (this.value == false&&this.flag!=3 || this.flag == 2) {
- if (!this.gridList.grade) {
- this.$api.msg('等级不能为空')
- return
- }
- if (!this.gridList.impurity) {
- this.$api.msg('杂质不能为空')
- return
- }
- debugger
- console.log(this.gridList.waterContent)
- console.log(Number(this.gridList.waterContent))
- if (!this.gridList.waterContent) {
- this.$api.msg('初检水分不能为空')
- return
- }
- // if (!this.gridList.reWaterContent) {
- // this.$api.msg('复检水分不能为空')
- // return
- // }
- if (!this.gridList.mildewGrain) {
- this.$api.msg('霉变粒不能为空')
- return
- }
- if(this.gridList.goodsName!="大豆"){
- if (!this.gridList.bulkDensity) {
- this.$api.msg('容重不能为空')
- return
- }
- }
- if (!this.gridList.jiaorenli) {
- this.$api.msg('热损伤不能为空')
- return
- }
- if (!this.gridList.imperfectGrain) {
- this.$api.msg('不完整粒不能为空')
- return
- }
- }
- this.gridList.storageNumber = this.gridList.storageTagNo
- var kid=JSON.parse(JSON.stringify(this.gridList.warehouseInOutId))
- this.zjid=JSON.parse(JSON.stringify(this.gridList.id))
- that.gridList.warehouseInOutDetail={
- id:that.gridList.warehouseInOutDetailId,
- grade:that.gridList.grade,
- reGrade:that.gridList.grade,
- waterContent:that.gridList.waterContent,
- reWaterContent:that.gridList.reWaterContent,
- imperfectGrain:that.gridList.imperfectGrain,
- reImperfectGrain:that.gridList.reImperfectGrain,
- impurity:that.gridList.impurity,
- reImpurity:that.gridList.reImpurity,
- jiaorenli:that.gridList.jiaorenli,
- reJiaorenli:that.gridList.reJiaorenli,
- bulkDensity:that.gridList.bulkDensity,
- reBulkDensity:that.gridList.reBulkDensity,
- mildewGrain:that.gridList.mildewGrain,
- reMildewGrain:that.gridList.reMildewGrain,
- }
- console.log(this.gridList)
- this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
- warehouseId: this.cangid
- }).then(res => {
- if(res.data.code != 200 && that.gridList.serviceManagementType==3){
- uni.showModal({
- content:res.data.message,
- showCancel:false
- })
- return;
- }
- else{
- uni.showModal({
- content: text,
- showCancel: true,
- confirmText: '提交',
- success: function(res) {
- if (res.confirm) {
- that.$api.doRequest('post',
- '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
- .then(res => {
- uni.setStorageSync("quality_print", that.gridList)
- // that.gridList.id=kid
- // that.gridList.statusFlag=1
- // that.$api.doRequest('post',
- // '/warehouseInOutInfo/InOutWarehouse',
- // that.gridList)
- // .then(res => {
- if (res.data.code == 200) {
- that.$api.msg('编辑质检成功')
- that.gridList.warehouseId = that.cangid
-
- uni.setStorageSync('checkcustomer',{})
- console.log('that.gridList', that.gridList)
- if(that.utils.getCurrectRoles('acquisitionQuality.initial')){
- that.isShowPrint = true
- }else{
- uni.navigateBack({delta:1})
- }
- // uni.getStorageSync("depotAcquisition_warehouseName")
- // uni.navigateBack({})
- }
- // })
- })
- }
- }
- })
- }
- })
-
- },
- gradepicker(e) {
- console.log(e)
- // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
- this.gridList.grade = this.gradeList[e[0]].value
- this.gridList.gradeKey = this.gradeList[e[0]].key
- this.waterContentChange()
- },
- gradepicker1(e) {
- console.log(e)
- // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
- this.gridList.reGrade = this.gradeList[e[0]].value
- this.gridList.reGradeKey = this.gradeList[e[0]].key
- },
- binNumberpicker(e) {
- this.gridList.binNumber = this.warehouseList[e[0]].binNumber
- },
- del(item) {
- this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
- id: item.id
- }).then(res => {
- if (res.data.code == 200) {
- this.$api.msg('删除成功')
- } else {
- this.$api.msg('系统异常,请联系管理员')
- }
- })
- },
- contactUs() {
- const that = this
- uni.makePhoneCall({
- // 手机号
- phoneNumber: '18241771147',
- // 成功回调
- success: (res) => {},
- // 失败回调
- fail: (res) => {}
- });
- },
- loadData() {
- // const that = this
- // if(uni.getStorageSync("PageCur")){
- // that.PageCur = uni.getStorageSync("PageCur");
- // }
- // that.userInfoTmp = uni.getStorageSync("userInfo")
- // uni.showLoading({
- // title: '正在加载',
- // mask:true
- // })
- // that.$api.request('integral', 'getIndexData', failres => {
- // that.$api.msg(failres.errmsg)
- // uni.hideLoading()
- // }).then(res => {
- // let data = res.data
- // uni.setStorageSync("message", data.message);
- // uni.setStorageSync("task", data.task);
- // uni.setStorageSync("contract", data.contract);
- // uni.setStorageSync('showTran', data.showTran);
- // that.showTran = data.showTran
- // that.gridList[4].tips = data.task
- // that.gridList[2].tips = data.contract
- // that.companyId = data.companyId
- // uni.hideLoading()
- // })
- },
- confirm() {
- const that = this
- if (!that.inputContent) {
- that.$api.msg('输入不能为空')
- return
- }
- let obj = {}
- obj[that.feild] = that.inputContent
- that.$api.request('user', 'syncUserInfo', obj).then(res => {
- that.userInfo.nickname = that.inputContent
- that.inputContent = ''
- that.$store.commit('login', that.userInfo)
- })
- },
- cancel() {
- this.inputShow = false
- this.inputStatus = 'none'
- this.genderShow = false
- },
- myAccount() {
- uni.navigateTo({
- url: `/pageA/pages/contract`
- })
- },
- /**
- * 统一跳转接口,拦截未登录路由
- * navigator标签现在默认没有转场动画,所以用view
- */
- navTo(url) {
- if (!this.hasLogin) {
- url = '/pages/public/login';
- }
- uni.navigateTo({
- url
- })
- },
- mycarClick(carNo) {
- this.modalName = null
- uni.navigateTo({
- url: `/pageB/car/mycar_detail?carNo=${carNo}`
- })
- },
- scanCode() {
- uni.scanCode({
- success: function(res) {
- uni.navigateTo({
- url: res.result
- })
- }
- })
- },
- hideModal(e) {
- this.modalName = null
- },
- }
- }
- </script>
- <style lang='scss' scoped>
- .title_b {
- margin: 20rpx 20rpx 0rpx 20rpx;
- padding: 20rpx 10rpx 20rpx 10rpx;
- font-size: 18px;
- font-weight: 550;
- }
- page {
- background: #F5F6FA;
- }
- .wrap {
- padding-bottom: 10px;
- font-size: 14px;
- background: #fff;
- margin: 10px;
- border-radius: 10px;
- input {
- font-size: 14px;
- }
- >.title {
- padding: 10px 16px;
- }
- .b-b:after {
- border-bottom: 1px solid #eee;
- }
- }
- .footer {
- background: #fff;
- position: fixed;
- bottom: 0;
- width: 100%;
- padding: 20px 10px;
- z-index: 10;
- .button {
- background: #22C572;
- width: 90%;
- margin: 20rpx auto;
- padding: 10px;
- color: #fff;
- text-align: center;
- border-radius: 30px;
- }
- }
- .c-row {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-align: center;
- -webkit-align-items: center;
- align-items: center;
- padding: 20rpx 30rpx;
- position: relative;
- }
- .con-list {
- -webkit-box-flex: 1;
- -webkit-flex: 1;
- flex: 1;
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-orient: vertical;
- -webkit-box-direction: normal;
- -webkit-flex-direction: column;
- flex-direction: column;
- color: #303133;
- line-height: 40rpx;
- text-align: right;
- padding-right: 20rpx;
- }
- input:disabled {
- color: #ccc;
- }
- .textarea-style {
- border: 1px solid #EEEEEE;
- width: 100%;
- padding: 20rpx;
- border-radius: 20rpx;
- }
- .c-row-fj {
- padding: 20rpx
- }
- .buns_item {
- display: flex;
- padding: 80rpx 0 50rpx 0;
- justify-content: space-around;
- }
- .but_css {
- background: #22C572;
- width: 40%;
- padding: 20rpx;
- color: #fff;
- text-align: center;
- border-radius: 20rpx;
- }
- </style>
|