123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631 |
- <template>
- <view :style='{"margin-bottom":InputEvent!=""?"100px":0}'>
- <view @click='hidden' class='wrap'>
- <view class='title_b'>基本信息</view>
- <view class="c-row ">
- <view class="title">类型</view>
- <view class="con-list">
- <u-radio-group @change="groupChange" v-model="typevalue">
- <u-radio v-show="utils.getCurrectRoles('acquisitionQuality.initial')" key="1" label="贸易入库"
- name="1">贸易入库</u-radio>
- <u-radio v-show="utils.getCurrectRoles('acquisitionQuality.qview')" key="3" label="收购入库"
- name="3">
- 收购入库</u-radio>
- </u-radio-group>
- </view>
- </view>
- <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' 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 @click='show4=true'>{{gridList.inOutTaskNo?gridList.inOutTaskNo:'请选择任务编号'}}</view>
- <u-picker :range="taskNolist" range-key="inOutTaskNo" @confirm='tasknopicker($event)'
- v-model="show4" mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-show='typevalue==1&&gridList.inOutType!="移库入库"||typevalue==3' class="c-row ">
- <view class="title">合同编号</view>
- <view class="con-list">
- {{gridList.contractNo?gridList.contractNo:'自动获取,不可编辑'}}
- </view>
- </view>
- <view v-show='typevalue==1&&gridList.inOutType=="移库入库"' class="c-row ">
- <view class="title">移库编号</view>
- <view class="con-list">
- {{gridList.contractNo?gridList.contractNo:'自动获取,不可编辑'}}
- </view>
- </view>
- <!-- <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
- <view class="title">业务编号</view>
- <view class="con-list">
- {{gridList.qualityNo}}
- </view>
- </view> -->
- <view v-show='typevalue==1' style=' align-items: flex-start;' class="c-row ">
- <view class="title">提示</view>
- <view class="con-list">
- {{gridList.tips?gridList.tips:'自动获取,不可编辑'}}
- </view>
- </view>
- <!-- <view v-show='typevalue==1' class="c-row ">
- <view class="title">成本</view>
- <view class="con-list">
- <view v-show='!coststatus'>{{gridList.cost?gridList.cost:'自动获取,不可编辑'}}</view>
- <view v-show='coststatus'>
- <input v-model='gridList.cost' placeholder="请输入成本" name="input" type="digit"></input>
- </view>
- </view>
- <button class='cu-btn bg-green shadow' @click="changecost">{{costtext}}</button>
- </view>
- <view v-show='typevalue==1' class="c-row ">
- <view class="title">运费</view>
- <view class="con-list flex">
- <view v-show='!freightstatus'>{{gridList.freight?gridList.freight:'自动获取,不可编辑'}}</view>
- <view v-show='freightstatus'>
- <input v-model='gridList.freight' placeholder="请输入运费" name="input" type="digit"></input>
- </view>
- </view>
- <button class='cu-btn bg-green shadow' @click="changefreight">{{freighttext}}</button>
- </view> -->
- <!-- <view v-show='typevalue==1' class="c-row ">
- <view class="title">扣款</view>
- <view class="con-list">
- <input v-model='gridList.deductionAmount' placeholder="请输入扣款" name="input" type="digit"></input>
- </view>
- </view> -->
- <view v-show='typevalue==1' class="c-row ">
- <view class="title">入库类型</view>
- <view class="con-list">
- {{gridList.inOutType?gridList.inOutType:'自动获取,不可编辑'}}
- </view>
- </view>
- <view v-show='typevalue==1' class="c-row ">
- <view class="title">入库日期</view>
- <view class="con-list">
- <view @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-show='typevalue==1||typevalue==3&&gridList.outType=="自运"&&utils.getCurrectRoles("acquisitionQuality.initial")'
- class="c-row ">
- <view class="title">车队</view>
- <view class="con-list">
- <view @click='show6=true'>{{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-show="gridList.paramType != '1'&&utils.getCurrectRoles('acquisitionQuality.initial')" class="c-row ">
- <view class="title">扣重比</view>
- <view class="con-list">
- <input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比" name="input" type="digit"></input>
- </view>
- </view> -->
- <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")||typevalue==1' class="c-row ">
- <view class="title">货名</view>
- <view class="con-list">
- <view>{{gridList.goodsName}}</view>
- <!-- <view v-show='goodsdisabled'>{{gridList.goodsName}}</view> -->
- <!-- <view v-show='!goodsdisabled' @click='show2=true'>{{gridList.goodsName}}</view> -->
- <u-picker :range="goodsList" range-key="goodsName" @confirm='goodspicker($event)' v-model="show2"
- mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
- <view class="title">购粮性质</view>
- <view class="con-list">
- <input v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质" name="input"></input>
- </view>
- </view>
- <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
- <view class="title">类型</view>
- <view class="con-list">{{gridList.type?gridList.type:'干粮'}}</view>
- </view>
- <view v-show='typevalue==1' class="c-row ">
- <view class="title">运输方式</view>
- <view class="con-list">
- <view @click='show7=true'>{{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-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")' class="c-row ">
- <view class="title">运输方式</view>
- <view class="con-list">
- <view @click='show8=true'>{{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-show='typevalue==1' class="c-row ">
- <view class="title">车牌号</view>
- <view class="con-list" v-show='gridList.inOutType!="移库入库"||gridList.outType!="汽运"'>
- <input v-model='gridList.carNumber' @click.stop="handleShowKeyboard" :disabled="true"
- placeholder="请输入车牌号" name="input"></input>
- <master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false"
- :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
- </view>
- <view class="con-list" v-show='gridList.inOutType=="移库入库"&&gridList.outType=="汽运"'>
- <view @click='show9=true'>{{gridList.carNumber?gridList.carNumber:'请选择车牌号'}}</view>
- <u-picker :range="tranCarInfoList" range-key="carNo1" @confirm='carNopicker($event,1)'
- v-model="show9" mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-show='utils.getCurrectRoles("acquisitionQuality.initial")' class="c-row ">
- <view class="title">仓位号</view>
- <view class="con-list">
- <view @click='show=true'>{{gridList.binNumber?gridList.binNumber:'请选择仓位号'}}</view>
- <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
- v-model="show" 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 type="digit" v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
- </view>
- </view>
- <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")' class="c-row ">
- <view class="title">客户</view>
- <view class="con-list">
- <view @click='gocustomer' v-show='gridList.customerName'>
- {{gridList.customerName}}({{gridList.customerPhone}})
- </view>
- <view @click='gocustomer' v-show='!gridList.customerName'>
- 选择客户
- </view>
- </view>
- </view>
- <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")' class="c-row ">
- <view class="title">交易量</view>
- <view class="con-list">
- <view :style="redstatus?'color:red;':''">
- {{gridList.volumeofbusiness?gridList.volumeofbusiness:'0'}}
- </view>
- </view>
- </view>
- <view v-show='typevalue==3&&utils.getCurrectRoles("acquisitionQuality.qview")' class="c-row ">
- <view class="title">车牌号</view>
- <view class="con-list" v-show='gridList.inOutType!="移库入库" ||gridList.outType!="汽运"'>
- <input v-model='gridList.carNumber' @click.stop="handleShowKeyboard1" :disabled="true"
- placeholder="请输入车牌号" name="input"></input>
- <master-keyboard ref="keyboard1" keyboardtype="car" :randomNumber="true" :newCar="false"
- :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
- </view>
- <view class="con-list" v-show='gridList.inOutType=="移库入库"&&gridList.outType=="汽运"'>
- <view @click='show9=true'>{{gridList.carNumber?gridList.carNumber:'请选择车牌号'}}</view>
- <u-picker :range="tranCarInfoList" range-key="carNo1" @confirm='carNopicker($event,1)'
- v-model="show9" mode="selector">
- </u-picker>
- </view>
- </view>
- <!-- <view v-show="gridList.paramType != '1'&&utils.getCurrectRoles('acquisitionQuality.initial')" class="c-row ">
- <view class="title">扣重比</view>
- <view class="con-list">
- <input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比" name="input" type="digit"></input>
- </view>
- </view> -->
- <!-- <view v-else class="c-row ">
- <view class="title">扣杂</view>
- <view class="con-list">
- <input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input="waterContentChange"
- name="input" type="digit"></input>
- <input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input="waterContentChange"
- name="input" type="digit"></input>
- </view>
- </view> -->
- <view v-show="typevalue==3&&utils.getCurrectRoles('acquisitionQuality.qview')" class="c-row">
- <view class="title">箱号-1</view>
- <view class="con-list">
- <input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="typevalue==3&&utils.getCurrectRoles('acquisitionQuality.qview')" class="c-row">
- <view class="title">封号-1</view>
- <view class="con-list">
- <input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="typevalue==3&&utils.getCurrectRoles('acquisitionQuality.qview')" class="c-row">
- <view class="title">箱号-2</view>
- <view class="con-list">
- <input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="typevalue==3&&utils.getCurrectRoles('acquisitionQuality.qview')" class="c-row">
- <view class="title">封号-2</view>
- <view class="con-list">
- <input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="typevalue==1 " class="c-row ">
- <view class="title">箱号-1</view>
- <view class="con-list">
- <input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="typevalue==1 " class="c-row ">
- <view class="title">封号-1</view>
- <view class="con-list">
- <input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="typevalue==1 " class="c-row ">
- <view class="title">箱号-2</view>
- <view class="con-list">
- <input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="typevalue==1 " class="c-row ">
- <view class="title">封号-2</view>
- <view class="con-list">
- <input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
- </view>
- </view>
- </view>
- <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')" style='padding-bottom:300rpx;'>
- <view class='wrap'>
- <view style='margin-right:10px;' class='flex justify-between align-item-center'>
- <view class='title_b'>化验信息</view>
- <view 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">
- <view @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
- <u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
- mode="selector">
- </u-picker>
- </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 v-model='gridList.waterContent' @click="SetInputKey('waterContent')"
- placeholder="初检水分" @input="waterContentChange" name="input" type="digit"></input>
- <!-- <input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
- name="input" type="digit"></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 v-model='gridList.bulkDensity' placeholder="请输入容重"
- @click="SetInputKey('bulkDensity')" name="input" type="digit" @input="obtainPrice"></input>
- <!-- <input v-model='gridList.bulkDensity' placeholder="请输入容重" name="input" type="digit" @input="obtainPrice"></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 v-model='gridList.protein' placeholder="请输入蛋白"
- @click="SetInputKey('protein')" name="input" type="digit" @input="obtainPrice"></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 v-model='gridList.imperfectGrain' @click="SetInputKey('imperfectGrain')"
- placeholder="请输入不完整粒占比" name="input" type="digit"></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('impurity')"></MyNumberInput>
- <input v-else v-model='gridList.completeGrain'
- placeholder="请输入完善粒率占比" name="input" type="digit"></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 v-model='gridList.impurity' placeholder="请输入杂质占比" @click="SetInputKey('impurity')"
- name="input" type="digit"></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 v-model='gridList.mildewGrain' @click="SetInputKey('mildewGrain')"
- placeholder="请输入霉变粒占比" name="input" type="digit"></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 v-model='gridList.jiaorenli' @click="SetInputKey('jiaorenli')"
- placeholder="请输入热损伤占比" name="input" type="digit"></input>
- </view>
- </view>
- <view class="c-row" v-if="gridList.goodsName == '大豆'">
- <view class="title">转基因</view>
- <view class="con-list">
- <MyNumberInput :myvalue="gridList.transgene" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'transgene'" @setValue="mykeywordset" v-if="InputEvent=='transgene'"
- @Cancelword="Cancelword" @goNext="goNext('transgene')"></MyNumberInput>
- <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>
- </view>
- <view class="c-row" v-if="gridList.goodsName == '大豆'">
- <view class="title">色泽/气味</view>
- <view class="con-list">
- <MyNumberInput :myvalue="gridList.colorLustre" :Isedit="Isedit" :IsShow="MykeywordShow"
- :myevent="'colorLustre'" @setValue="mykeywordset" v-if="InputEvent=='colorLustre'"
- @Cancelword="Cancelword" @goNext="goNext('colorLustre')"></MyNumberInput>
- <!-- <input v-else v-model='gridList.colorLustre' @click="SetInputKey('colorLustre')"
- placeholder="请选择色泽/气味是否正常" name="input" type="digit"></input> -->
- <div @click="colorLustreShow = true">{{gridList.colorLustre}}</div>
-
- <!-- 转基因 -->
- <u-picker :range="colorLustreList" range-key="value" @confirm='colorLustreClick($event)' v-model="colorLustreShow"
- mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
- <view class="title">水分增价(元/吨)</view>
- <view class="con-list">
- <input v-model='gridList.waterPriceIncrease' @focus="pricefocus($event,1)"
- @input='deductionchange' placeholder="请输入水分增价" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
- <view class="title">水分扣价(元/吨)</view>
- <view class="con-list">
- <input v-model='gridList.waterPriceDeduction' @focus="pricefocus($event,2)"
- @input='deductionchange' placeholder="请输入水分扣价" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
- <view class="title">质量增价(元/吨)</view>
- <view class="con-list">
- <input v-model='gridList.qualityPriceIncrease' @focus="pricefocus($event,3)"
- @input='deductionchange' placeholder="请输入质量增价" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
- <view class="title">质量扣价(元/吨)</view>
- <view class="con-list">
- <input v-model='gridList.qualityPriceDeduction' @focus="pricefocus($event,4)"
- @input='deductionchange' placeholder="请输入质量扣价" name="input" type="digit"></input>
- </view>
- </view>
- <view v-show="gridList.type == '干粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3"
- class="c-row">
- <view class="title">干粮单价(元/公斤)</view>
- <view class="con-list">
- <input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' @blur='inputprice'
- placeholder="请输入干粮单价" name="input" type="digit"></input>
- </view>
- <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
- </view>
- <view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3"
- class="c-row">
- <view class="title">净重单价(元/公斤)</view>
- <view class="con-list">
- <input v-model='gridList.tidalGrainPrice' :disabled='pricedisabled' @blur='inputprice'
- placeholder="自动获取,不可编辑" name="input" type="digit"></input>
- </view>
- <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
- </view>
- <view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
- class="c-row">
- <view class="title">净重单价(元/公斤)</view>
- <view class="con-list">
- <input v-model='gridList.tidalGrainPrice' :disabled='disabled1' @blur='inputprice'
- placeholder="自动获取,不可编辑" name="input" type="digit"></input>
- </view>
- </view>
- <!-- <view v-show="gridList.type == '潮粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
- class="c-row">
- <view class="title">净重单价(元/公斤)</view>
- <view class="con-list">
- <input v-model='gridList.tidalGrainPrice' :disabled='disabled1' @blur='inputprice'
- placeholder="自动获取,不可编辑" name="input" type="digit"></input>
- </view>
- </view> -->
- <view v-show="gridList.type == '干粮'&&utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==1"
- class="c-row">
- <view class="title">干粮单价(元/公斤)</view>
- <view class="con-list">
- <input v-model='gridList.dryGrainPrice' :disabled='disabled1' @blur='inputprice'
- placeholder="请输入干粮单价" name="input" type="digit"></input>
- </view>
- </view>
- </view>
- </view>
- <view class="footer">
- <!-- <view @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" @cancel="cancelClick"></u-modal>
- <!-- @confirm="alertBtn" -->
- <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>
-
- </view>
- </template>
- <script>
- const Equ_List = ['waterContent', 'bulkDensity', 'imperfectGrain', 'impurity', 'mildewGrain', 'jiaorenli','protein','completeGrain'];
- 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 {
- redstatus:false,
- isShowPrint: false,
- isShowAlert: false,
- disabled1: false,
- content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
- inputShow: false,
- params: {
- year: true,
- month: true,
- day: true,
- },
- Data: {
- ktv: '111111'
- },
- Isedit: false,
- MykeywordShow: false,
- InputEvent: '',
- dryGrainPrice: 0,
- tidalGrainPrice: 0,
- modalName: '',
- pricetext: '锁定',
- pricedisabled: false,
- show8: false,
- mycarStyle: '',
- feild: undefined,
- id: 0,
- outType: '他运',
- show: false,
- show4: false,
- show5: false,
- show6: false,
- show7: false,
- show9: false,
- edit: true,
- goodsdisabled: false,
- freighttext: '手动填写',
- costtext: '手动填写',
- selector: [],
- show1: false,
- inputContent: '',
- multiSelector1: [{
- name: '他运',
- value: '他运'
- }],
- printId:'',
- typevalue: '3',
- coverTransform: 'translateY(0px)',
- coverTransition: '0s',
- moving: false,
- footprintList: [],
- searchKeyWord: '',
- isVip: false,
- userInfoTmp: [],
- inputStatus: 'none',
- carInfo: [],
- gridCol: 4,
- freightstatus: false,
- coststatus: false,
- pageSize: 10,
- show3: false,
- show2: false,
- goodsList: [],
- currentPage: 1,
- value: false,
- gridBorder: false,
- headUrl: "../../static/img/myimg/YongHu@3x.png",
- userphone: "",
- username: "请更改昵称",
- contractFlag: 10,
- gridList: {
- outType: '汽运',
- natureOfGrainPurchase: '贸易粮',
- type: '',
- tidalGrainPrice: '',
- dryGrainPrice: '',
- buckleMiscellaneous: '',
- carNumber: '',
- customerName: '',
- customerPhone: '',
- bulkDensity: "",
- imperfectGrain: "",
- waterPriceIncrease: 0,
- waterPriceDeduction: 0,
- qualityPriceIncrease: 0,
- qualityPriceDeduction: 0,
- waterContent: "",
- jiaorenli: "",
- impurity: "",
- mildewGrain: "",
- compName: "",
- type: '',
- freight: 0,
- cost: '',
- addressUrl: '',
- tidalGrainPrice: 0,
- buckleWeightRatio: 0,
- buckleMiscellaneous: 0,
- paramType: 1,
- warehouseInOutDetail: {
- grade: '',
- reGrade: '',
- imperfectGrain: '',
- reImperfectGrain: '',
- impurity: '',
- reImpurity: '',
- jiaorenli: '',
- reJiaorenli: '',
- bulkDensity: '',
- reBulkDensity: '',
- mildewGrain: '',
- reMildewGrain: '',
- },
- disablednotarize: false,
- deductionAmount: 0,
- deductionWeight: 0,
- grossWeight: 0,
- tare: 0,
- grade: '',
- inOutDate: new Date().toISOString().slice(0, 10),
- netWeight: 0,
- pureWeight: 0,
- deductionWeight: 0,
- waterContent: '',
- reWaterContent: '',
- reGrade: '',
- imperfectGrain: '',
- reImperfectGrain: '',
- impurity: '',
- reImpurity: '',
- jiaorenli: '',
- reJiaorenli: '',
- bulkDensity: '',
- reBulkDensity: '',
- reMemo: '',
- storageTagNo: '',
- mildewGrain: '',
- reMildewGrain: '',
- boxNo: '',
- boxNoOther: '',
- titleNo: '',
- titleNoOther: '',
- statusFlag: 1
- },
- gridListInit: {
- natureOfGrainPurchase: '贸易粮',
- type: '',
- tidalGrainPrice: '',
- dryGrainPrice: '',
- buckleMiscellaneous: '',
- carNumber: '',
- customerName: '',
- customerPhone: '',
- bulkDensity: "",
- imperfectGrain: "",
- waterContent: "",
- jiaorenli: "",
- impurity: "",
- mildewGrain: "",
- compName: "",
- type: '',
- freight: 0,
- cost: '',
- addressUrl: '',
- tidalGrainPrice: 0,
- buckleWeightRatio: 0,
- buckleMiscellaneous: 0,
- paramType: 1,
- warehouseInOutDetail: {
- grade: '',
- reGrade: '',
- imperfectGrain: '',
- reImperfectGrain: '',
- impurity: '',
- reImpurity: '',
- jiaorenli: '',
- reJiaorenli: '',
- bulkDensity: '',
- reBulkDensity: '',
- mildewGrain: '',
- reMildewGrain: '',
- },
- disablednotarize: false,
- deductionAmount: 0,
- deductionWeight: 0,
- grossWeight: 0,
- tare: 0,
- grade: '',
- // inOutDate: new Date().toISOString().slice(0, 10),
- netWeight: 0,
- pureWeight: 0,
- deductionWeight: 0,
- waterContent: '',
- reWaterContent: '',
- reGrade: '',
- imperfectGrain: '',
- reImperfectGrain: '',
- impurity: '',
- reImpurity: '',
- jiaorenli: '',
- reJiaorenli: '',
- bulkDensity: '',
- reBulkDensity: '',
- reMemo: '',
- storageTagNo: '',
- mildewGrain: '',
- reMildewGrain: '',
- boxNo: '',
- boxNoOther: '',
- titleNo: '',
- titleNoOther: '',
- statusFlag: 1
- },
- typeList: ['潮粮', '干粮'],
- managementType: '',
- flag: 2,
- warehouseName: '',
- warehouseList: [],
- warehouseCount: '',
- commonWarehouseNo: '',
- warehouseTradeCount: 0,
- showTran: true,
- companyId: 1,
- contractNolist: [],
- current: 4,
- taskNolist: [],
- tranCarInfoList: [],
- fleetNameList: [],
- multiSelector: [{
- name: '汽运',
- value: '0',
- },
- {
- name: '火运',
- value: '1',
- },
- {
- name: '集装箱船',
- value: '2',
- },
- {
- name: '散船',
- value: '3',
- },
- ],
- gradeList: [{
- key: 1,
- value: '一等品'
- },
- {
- key: 2,
- value: '二等品'
- },
- {
- key: 3,
- value: '三等品'
- },
- {
- key: 4,
- value: '等外'
- },
- ],
- cangid: '',
- inType: "" ,//入库类型
- 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) {
- console.log(this.cangid)
- this.commonWarehouseNo = options.commonWarehouseNo
- this.warehouseCount = Number(options.warehouseCount) + 1
- this.warehouseTradeCount = Number(options.warehouseTradeCount) + 1
- let number = '000' + this.warehouseCount
- number = number.substring(number.length - 4, number.length)
- this.gridList.warehouseName = options.warehouseName
- // this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
- this.cangid = options.cangid
- this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
- id: this.cangid
- }).then(res => {
- console.log(res)
- this.warehouseList = res.data.data.warehousePositionInfoList
- })
- if (uni.getStorageSync('compName1')) {
- this.gridList.compName = uni.getStorageSync('compName1').company
- }
- this.gridList.person = options.personCharge
- this.gridList.personPhone = options.personPhone
- this.gridList.qualityInspector = uni.getStorageSync("userInfo").userName
- // this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
- // warehouseId: this.cangid
- // }).then(res => {
- // if (res.data.data) {
- // this.setGoodName([0])
- // }
- // })
- this.managementType = options.managementType
- let that = this
- this.purchasePriceList = uni.getStorageSync('purchasePriceList')
- // if (uni.getStorageSync('checkcustomer')) {
- // 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
- // }
- this.gridList.grade = this.gradeList[2].value
- this.gridList.gradeKey = this.gradeList[2].key
- 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) {
- that.gridList.goodsName = that.goodsList[0].goodsName
- uni.setStorageSync('purchasePriceList', that.goodsList)
- that.purchasePriceList = uni.getStorageSync('purchasePriceList')
- }
- } else if (res.data.code != 200) {
- uni.showModal({
- content: res.data.message,
- showCancel: false
- })
- }
- })
- console.log(this.gridList)
- this.gridListInit = this.gridList
- },
- onShow() {
- if (this.utils.getCurrectRoles('acquisitionQuality.initial') && !this.utils.getCurrectRoles(
- 'acquisitionQuality.qview')) {
- this.typevalue = '1'
- this.contractFlag = 7
- } else {
- this.typevalue = '3'
- this.contractFlag = 10
- }
- uni.showLoading({
- title: '加载中',
- mask: true
- })
- if (this.typevalue == '3') {
- this.flag = 3
- } else {
- this.flag = 2
- }
- this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
- flag: this.flag,
- warehouseName: this.gridList.warehouseName
- }).then(res => {
- console.log(res)
- this.taskNolist = res.data.data
- })
- this.multiSelector1 = [{
- name: '他运',
- value: '他运'
- }]
- this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
- warehouseName: this.gridList.warehouseName
- }).then(res => {
- uni.hideLoading();
- // 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
- })
- if (uni.getStorageSync('checkcustomer')) {
- 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
- var that = this
- setTimeout(()=>{
- },1000)
- console.log(this.gridList.goodsName)
- if(!this.gridList.goodsName){
- this.gridList.goodsName = uni.getStorageSync('goodsName')
- }
- if(this.gridList.goodsName){
- uni.showLoading({
- title: '加载中',
- mask: true
- })
- this.$api.doRequest('get', '/qualityInspectionManagement/getQualityInspectionManagementMap', {
- goodsName: this.gridList.goodsName,
- compId: uni.getStorageSync('pcUserInfo').compId,
- customerNumberCard: this.gridList.customerNumberCard,
- warehouseName: this.gridList.warehouseName
- }).then(res => {
- uni.hideLoading();
- if(res.data.data.A+res.data.data.B+res.data.data.C*50>res.data.data.D-50){
- that.redstatus=true
- }else{
- that.redstatus=false
- }
- var a=res.data.data.A>0?'已完成'+Number(res.data.data.A).toFixed(2)+'吨,':''
- var b=res.data.data.B>0?'进行中'+Number(res.data.data.B).toFixed(2)+'吨,':''
- var c=res.data.data.C>0?'未称重'+Number(res.data.data.C)+'车':''
-
- that.gridList.volumeofbusiness=a+b+c
- console.log(that.gridList.volumeofbusiness)
- that.$forceUpdate()
- })
- }
- }
- },
- methods: {
- colorLustreClick(e){
- this.gridList.colorLustre = this.colorLustreList[e[0]].value
- },
- transgeneClick(e){
- this.gridList.transgene = this.transgeneList[e[0]].value
- },
- Cancelword() {
- this.bottomHeight = '10rpx';
- this.MykeywordShow = false;
- this.InputEvent = '';
- },
- goNext(val) {
- var inputList = Equ_List;
- if (this.menuIndex == 1) {
- inputList = Sign_List;
- }
- 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) {
- var inputList = Equ_List;
- 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 = ''
- }
- }
- },
- deductionchange() {
- 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()
- },
- carNopicker(e) {
- this.gridList.carNumber = this.tranCarInfoList[e[0]].carNo
- for (let i = 0; i < this.tranCarInfoList.length; i++) {
- if (i == e[0]) {
- this.gridList.carNo = this.tranCarInfoList[i].carNo
- this.gridList.carNoCopy = this.tranCarInfoList[i].carNo + '(' + this.tranCarInfoList[i].tranCarNo +
- ')'
- this.gridList.tranCarNo = this.tranCarInfoList[i].tranCarNo
- this.gridList.carId = this.tranCarInfoList[i].id
- this.gridList.freight = Math.round(
- this.tranCarInfoList[i].tranPrice
- )
- if (this.gridList.inOutType == '移库入库') {
- if (!this.gridList.cost) {
- this.gridList.cost = this.tranCarInfoList[i].cost
- }
- this.gridList.loadNetWeight =
- this.tranCarInfoList[i].loadNetWeight
- }
- }
- }
- },
- obtainPrice() { //根据容重获取价格
- if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
- // if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
- let quality = this.gridList.goodsName=='大豆'?this.gridList.protein:this.gridList.bulkDensity
- this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
- warehouseId: this.cangid,
- goodsName: this.gridList.goodsName,
- bulkDensity: quality
- }).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 = '解锁'
- }
- console.log(this.gridList.dryGrainPrice, this.gridList.tidalGrainPrice)
- if (this.gridList.type == '干粮') {
- this.dryGrainPrice = this.gridList.dryGrainPrice
- }
- if (this.gridList.type == '潮粮') {
- this.tidalGrainPrice = this.gridList.tidalGrainPrice
- }
- },
- groupChange(e) {
- console.log(e, this.gridListInit)
- this.gridListInit.warehouseName = this.gridList.warehouseName
- if (uni.getStorageSync('checkcustomer')) {
- uni.setStorageSync('checkcustomer', '')
- this.gridListInit.identityId = ''
- this.gridListInit.customerName = ''
- this.gridListInit.customerPhone = ''
- this.gridListInit.carNumber = ''
- this.gridListInit.customerNumberCard = ''
- this.$forceUpdate()
- }
- // this.gridList = JSON.parse(JSON.stringify(this.gridListInit))
- this.gridList = this.$u.deepClone(this.gridListInit)
- this.gridList.serviceManagementType = e
- if (e == 1) {
- if (this.flag != 2) {
- this.gridList.inOutTaskNo = ''
- this.gridList.contractNo = ''
- }
- this.gridList.qualityNo = ''
- this.flag = 2
- // this.contractFlag = 7
- } else {
- if (this.flag != 3) {
- this.gridList.inOutTaskNo = ''
- this.gridList.contractNo = ''
- }
- this.flag = 3
- // this.contractFlag = 10
- // let number = '000' + this.warehouseCount
- // number = number.substring(number.length - 4, number.length)
- // this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
- }
- this.gridList.grade = this.gradeList[2].value
- this.gridList.gradeKey = this.gradeList[2].key
- this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
- flag: this.flag,
- warehouseName: this.gridList.warehouseName
- }).then(res => {
- console.log(res)
- this.taskNolist = res.data.data
- })
- console.log(this.gridList, 111111111111)
- },
- outtypepicker(e, status) {
- console.log(e,status)
- if (status == 0) {
- this.gridList.outType = this.multiSelector[e[0]].name
- } else {
- if (this.multiSelector1[e[0]].name == '他运') {
- this.goodsdisabled = false
- this.gridList.outType = this.multiSelector1[e[0]].name
- } else {
- this.gridList.outType = '自运'
- this.goodsdisabled = true
- this.outType = this.multiSelector1[e[0]].name
- this.gridList.contractNo = this.multiSelector1[i].contractNo
- // if (this.gridList.contractNo == this.contractNolist[i].contractNo) {
- // this.gridList.goodsName = this.outContractNo[q].goodsName
- // this.gridList.goodsNameKey = this.outContractNo[q].goodsNameKey
- // }
- this.$api.doRequest('get', '/contractManagementInfo/getInContract', {
- contractNo: this.gridList.contractNo,
- compId: uni.getStorageSync('pcUserInfo').compId
- }).then(res => {
- this.contractNolist = res.data.data
- this.gridList.goodsName = this.contractNolist.goodsName
- this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
- })
- this.waterContentChange()
- }
- }
- console.log(this.gridList.outType)
- },
- 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 = '手动填写'
- }
- },
- inOutDatepicker(e) {
- this.gridList.inOutDate = e.year + '-' + e.month + '-' + e.day
- console.log(e)
- },
- fleetpicker(e) {
- this.gridList.fleet = this.fleetNameList[e[0]].fleetName
- },
- change(e) {
- if (e) {
- this.gridList.supplementaryRecording = 1
- } else {
- this.gridList.supplementaryRecording = 0
- }
- },
- tasknopicker(e) {
- console.log("切换任务编号", e)
- this.gridList.inOutTaskNo = this.taskNolist[e[0]].inOutTaskNo
- var data = this.taskNolist[e[0]]
- if (this.taskNolist[e[0]].inOutType == '收购入库') {
- this.gridList.contractNo = this.taskNolist[e[0]].contractNo
- this.inType = this.taskNolist[e[0]].inOutType
- this.gridList.goodsName = this.taskNolist[e[0]].goodsName
- if (this.taskNolist[e[0]].goodsName.indexOf("潮粮") != -1) { //收购从合同中带出货名 单价等信息 用货名是否带有潮粮字符来判断干潮类型
- this.gridList.type = "潮粮"
- this.gridList.imperfectGrain = 8
- this.gridList.impurity = 1
- this.gridList.mildewGrain = 2
- this.gridList.jiaorenli = 0
- } else {
- this.gridList.type = "干粮"
- this.gridList.imperfectGrain = 8
- this.gridList.impurity = 1
- this.gridList.mildewGrain = 2
- this.gridList.jiaorenli = 1
- }
- }
- if (this.taskNolist[e[0]].contractNo) {
- this.gridList.contractNo = this.taskNolist[e[0]].contractNo
- } else {
- this.gridList.contractNo = this.taskNolist[e[0]].moveTaskNo
- }
- this.$api.doRequest('get', '/contractManagementInfo/getInContract', {
- contractNo: this.gridList.contractNo,
- compId: uni.getStorageSync('pcUserInfo').compId
- }).then(res => {
- this.contractNolist = res.data.data
- if (this.typevalue == 3) {
- var gooddata = this.goodsList.filter((item) => {
- return item.goodsName == this.contractNolist.goodsName
- })
- if (this.contractNolist.priceType == "定价收购" && this.inType == "收购入库") {
- this.gridList.dryGrainPrice = Number(this.contractNolist.unitContractPrice / 1000)
- .toFixed(3)
- }
- if (gooddata.length > 0) {
- // 收购入库
- for (let q = 0; q < this.goodsList.length; q++) {
- if (this.goodsList[q].goodsName == this.contractNolist.goodsName) {
- this.gridList.goodsName = this.contractNolist.goodsName
- this.setGoodName([q])
- }
- }
- } else {
- if (this.inType != "收购入库") { //收购入库不校验仓库设置中的货名
- uni.showModal({
- title: '提示',
- content: '仓库设置中无该合同货名',
- showCancel: false,
- confirmText: '返回',
- success: function(res) {
- if (res.confirm) {
- uni.navigateBack({
- delta: 1
- })
- }
- }
- });
- }
- }
- } else {
- this.gridList.goodsName = this.contractNolist.goodsName
- if (this.gridList.goodsName == '玉米') {
- this.gridList.type = '干粮'
- this.gridList.imperfectGrain = 8
- this.gridList.impurity = 1
- this.gridList.mildewGrain = 2
- this.gridList.jiaorenli = 1
- if (this.contractNolist.priceType != '随行就市') {
- this.gridList.dryGrainPrice = Number(this.contractNolist.contractPrice / 1000)
- .toFixed(3)
- }
- this.edit = true
- } else if (this.gridList.goodsName.indexOf('潮粮') > -1) {
- this.gridList.type = '潮粮'
- this.edit = true
- if (this.contractNolist.priceType != '随行就市') {
- this.gridList.tidalGrainPrice = this.contractNolist.contractPrice
- this.tidalGrainPrice = this.contractNolist.contractPrice
- }
- this.gridList.imperfectGrain = 8
- this.gridList.impurity = 1
- this.gridList.mildewGrain = 2
- this.gridList.jiaorenli = 0
- } else {
- this.gridList.type = '干粮'
- this.gridList.imperfectGrain = 8
- this.gridList.impurity = 1
- this.gridList.mildewGrain = 2
- this.gridList.jiaorenli = 1
- this.edit = false
- if (this.contractNolist.priceType != '随行就市') {
- this.gridList.dryGrainPrice = Number(this.contractNolist.contractPrice / 1000)
- .toFixed(3)
- }
- }
- }
- this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
- this.gridList.grade = this.gradeList[2].value
- this.gridList.gradeKey = this.gradeList[2].key
- // this.gridList.grade = this.contractNolist.grade
- this.gridList.inOutType = this.contractNolist.inOutType
- if(this.gridList.goodsName == "大豆"){ //货名为大豆是设置默认
- this.gridList.transgene= "非转基因"
- this.gridList.reTransgene= "非转基因"
- this.gridList.colorLustre = "正常"
- this.gridList.reColorLustre = "正常"
- }else{
- delete this.gridList.transgene
- delete this.gridList.reTransgene
- delete this.gridList.colorLustre
- delete this.gridList.reColorLustre
- }
- if (this.gridList.inOutType == '采购入库') {
- this.warehouseTradeCount = '000' + this.warehouseTradeCount
- // this.gridList.qualityNo='CGRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
- if (!this.contractNolist.unitContractPrice) {
- this.gridList.tips = '卖方' + this.contractNolist.seller
- } else {
- this.gridList.tips = '卖方' + this.contractNolist.seller + '( ' + this.contractNolist
- .unitContractPrice + '元/吨)'
- }
- this.gridList.inOutTypeKey = 1
- console.log("this.gridList.inOutTypeKey", 1)
- } else if (this.gridList.inOutType == '移库入库') {
- this.warehouseTradeCount = '000' + this.warehouseTradeCount
- // this.gridList.qualityNo='YKRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
- if (this.contractNolist.unitContractPrice) {
- this.gridList.tips = '出货库' + data.sendWarehouse + ' (' + this.contractNolist
- .unitContractPrice + '元/吨)'
- } else {
- this.gridList.tips = '出货库' + data.sendWarehouse
- }
- this.gridList.inOutTypeKey = 3
- } else if (this.contractNolist.inOutType == '移库出库') {
- this.gridList.tips = '入货库' + data.receiveWarehouse
- } else if (this.contractNolist.inOutType == '暂存入库') {
- this.gridList.inOutTypeKey = 4
- } else if (this.contractNolist.inOutType == '贸易服务入库') {
- this.gridList.inOutTypeKey = 5
- } else if (this.contractNolist.inOutType == '退库') {
- this.warehouseTradeCount = '000' + this.warehouseTradeCount
- // this.gridList.qualityNo = 'CGRK' + this.getdate() + this.commonWarehouseNo + this
- // .warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
- if (this.contractNolist.contractNo) {
- this.gridList.tips = '买方' + this.contractNolist.buyer
- } else {
- this.gridList.tips = '出货库' + data.sendWarehouse
- }
- this.gridList.inOutTypeKey = 6
- }
- this.cost = this.contractNolist.contractPrice
- if (this.cost) {
- this.isGetCost = true
- this.gridList.cost = this.cost - this.gridList.deductionAmount
- } else {
- this.isGetCost = false
- this.gridList.cost = this.gridList.cost
- }
- if (this.contractNolist.inOutType == '移库入库') {
- this.isSelectType = false
- } else {
- this.isSelectType = true
- }
- if (this.contractNolist.priceType == '随行就市') {
- this.disabled1 = true
- } else {
- this.disabled1 = false
- }
- if (this.contractNolist.deliverType == '1') {
- this.carstatus = true
- } else {
- this.carstatus = false
- }
- this.tranCarInfoList = []
- if (this.contractNolist.tranCarInfoList) {
- for (var q = 0; q < this.contractNolist.tranCarInfoList.length; q++) {
- this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist.tranCarInfoList[q]
- .carNo
- if (this.contractNolist.tranCarInfoList[q].tranCarNo) {
- this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist
- .tranCarInfoList[q].carNo + '(' + this.contractNolist.tranCarInfoList[q]
- .tranCarNo + ')'
- } else {
- this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist.tranCarInfoList
- .carNo
- }
- }
- this.tranCarInfoList = this.contractNolist.tranCarInfoList
- // this.carstatus = true
- } else {
- this.tranCarInfoList = []
- }
- this.fleetNameList = this.contractNolist.tranCarInfoList1
- if(this.gridList.goodsName&&this.gridList.customerNumberCard){
- uni.showLoading({
- title: '加载中',
- mask: true
- })
- let that = this
- this.$api.doRequest('get', '/qualityInspectionManagement/getQualityInspectionManagementMap', {
- goodsName: this.gridList.goodsName,
- compId: uni.getStorageSync('pcUserInfo').compId,
- customerNumberCard: this.gridList.customerNumberCard
- }).then(res => {
- uni.hideLoading();
- if(res.data.data.A+res.data.data.B+res.data.data.C*50>res.data.data.D-50){
- that.redstatus=true
- }else{
- that.redstatus=false
- }
- var a=res.data.data.A>0?'已完成'+Number(res.data.data.A).toFixed(2)+'吨,':''
- var b=res.data.data.B>0?'进行中'+Number(res.data.data.B).toFixed(2)+'吨,':''
- var c=res.data.data.C>0?'未称重'+Number(res.data.data.C)+'车':''
-
- that.gridList.volumeofbusiness=a+b+c
- console.log(that.gridList.volumeofbusiness)
- that.$forceUpdate()
- })
- }
- })
- this.$forceUpdate()
- console.log(this.gridList)
- },
- print() {
- console.log(this.printId)
- if(this.printId){
- this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
- id: this.printId
- }).then(res => {
- uni.setStorageSync("quality_print", res.data.data)
- uni.navigateTo({
- url: '/pages/erpbusiness/bleConnect'
- })
- })
- }
-
- },
- close() {
- this.isShowPrint = false
- uni.navigateBack({})
- },
- hidden() {
- this.$refs.keyboard.open(false)
- },
- handleShowKeyboard() {
- if (this.$refs.keyboard.open) {
- this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
- } else {
- this.$refs.keyboard[0].open(true)
- }
- },
- handleShowKeyboard1() {
- 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 //键盘输入值
- },
- // confirmInfo() {
- // this.isShowAlert = true
- // },
- // alertBtn() {
- // this.$api.doRequest('get', '/qualityInspectionManagement/api/editQualityInspection', {
- // id: this.id,
- // flag:2
- // }).then(res => {
- // if(res.data.code=="200"){
- // this.$api.msg('提交成功!')
- // }else{
- // this.$api.msg('提交失败')
- // }
- // })
- // },
- cancelClick() {
- this.isShowAlert = false
- },
- 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
- }
- }
- }
- if (this.inType != "收购入库") { //非收购入库 价格取自合同
- 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
- ) {
-
- 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
- }
- }
- uni.hideLoading()
- })
- }
- },
- gocustomer() {
- uni.navigateTo({
- url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
- .warehouseName + '&goodsName=' + this.gridList.goodsName
- })
- },
- getdate() {
- var date = new Date()
- var year = date.getFullYear() //获取完整的年份(4位)
- var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
- var datetime = date.getDate() //获取当前日(1-31)
- if (mouth < 10) {
- mouth = '0' + mouth
- }
- if (datetime < 10) {
- datetime = '0' + datetime
- }
- return year + '' + mouth + '' + datetime
- },
- submit() {
- if (this.typevalue == 3) {
- if (this.outType) {
- this.gridList.outType = this.outType
- }
- }
- var that = this
- this.gridList.agent = this.userInfo.userName;
- this.gridList.carNo = this.gridList.carNumber
- this.gridList.baseId = this.cangid
- this.gridList.warehouseId = this.cangid
- if (this.typevalue == 1) {
- if (this.gridList.inOutType == '移库入库') {
- this.gridList.numberLetter = 'YKRK'
- } else {
- this.gridList.numberLetter = 'CGRK'
- }
- } else {
- this.gridList.numberLetter = 'SGRK'
- }
- this.gridList.warehouseNo = this.commonWarehouseNo
- if (!this.gridList.inOutTaskNo) {
- this.$api.msg('任务编号不能为空')
- return
- }
- if (this.utils.getCurrectRoles('acquisitionQuality.initial')) {
- // if (!this.gridList.qualityNo) {
- // this.$api.msg('编号不能为空')
- // return
- // }
- if (!this.gridList.binNumber) {
- this.$api.msg('仓位不能为空')
- return
- }
- if (this.typevalue == 3) {
- if (!this.gridList.natureOfGrainPurchase) {
- this.$api.msg('购粮性质不能为空')
- return
- }
- }
- // if (this.gridList.waterPriceIncrease>10||this.gridList.waterPriceIncrease<0) {
- // this.$api.msg('水分增价输入错误')
- // return
- // }
- // if (this.gridList.waterPriceDeduction>10||this.gridList.waterPriceDeduction<0) {
- // this.$api.msg('水分扣价输入错误')
- // return
- // }
- // if (this.gridList.qualityPriceIncrease>10||this.gridList.qualityPriceIncrease<0) {
- // this.$api.msg('质量增价输入错误')
- // return
- // }
- // if (this.gridList.qualityPriceDeduction>10||this.gridList.qualityPriceDeduction<0) {
- // this.$api.msg('质量扣价输入错误')
- // return
- // }
- if (!this.gridList.type) {
- this.$api.msg('类型不能为空')
- return
- }
- if (this.value == false) {
- if (!this.gridList.grade) {
- this.$api.msg('等级不能为空')
- return
- }
- if (!this.gridList.impurity) {
- this.$api.msg('杂质不能为空')
- return
- }
- 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.goodsName == "大豆"){
- if (!this.gridList.protein) {
- this.$api.msg('蛋白不能为空')
- return
- }
- }
- if (!this.gridList.jiaorenli && this.gridList.jiaorenli != 0) {
- this.$api.msg('热损伤不能为空')
- return
- }
- if (!this.gridList.imperfectGrain) {
- this.$api.msg('不完整粒不能为空')
- return
- }
- }
- }
- if (this.utils.getCurrectRoles('acquisitionQuality.qview')) {
- if (this.typevalue == 3) {
- if (!this.gridList.customerName) {
- 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
- }
- }
- var text = ''
- if (this.utils.getCurrectRoles('acquisitionQuality.qview') && !this.utils.getCurrectRoles(
- 'acquisitionQuality.initial')) {
- text = "确定提交钎样信息?"
- this.gridList.brazer = 1
- uni.showModal({
- content: text,
- showCancel: true,
- confirmText: '提交',
- success: function(res) {
- if (res.confirm) {
- that.gridList.serviceManagementType = that.typevalue
- if (that.typevalue == 3) {
- uni.showLoading({
- title: '加载中',
- mask: true
- })
- that.$api.doRequest('get', '/paymentManagement/cumulant', {
- compId: uni.getStorageSync('pcUserInfo').compId,
- customerNumberCard: that.gridList.customerNumberCard,
- goodsName: that.gridList.goodsName,
- })
- .then(response => {
- if (response.data.code == 200) {
- for (let i = 0; i < that.purchasePriceList.length; i++) {
- if (
- that.gridList.goodsName == that.purchasePriceList[
- i]
- .goodsName
- ) {
- let count = (that.purchasePriceList[i].saleLimit -
- response.data.data / 1000).toFixed(2)
- console.log(count, that.purchasePriceList[i]
- .saleLimit,
- response.data.data)
- if (Number(count) <= 0) {
- count = 0
- that.$api.msg('该客户累计销售' + that.gridList
- .goodsName +
- (
- response.data.data / 1000).toFixed(
- 2) +
- '吨,还可售粮' +
- count + '吨', )
- uni.hideLoading()
- } else {
- that.gridList.inOutFlag = 2
- that.$api.doRequest('post',
- '/warehouseInOutInfo/InOutWarehouse',
- that.gridList)
- .then(res => {
- if (res.data.code ==
- 200) {
- if (that.utils.getCurrectRoles(
- 'acquisitionQuality.qview'
- )) {
- if (!that.utils
- .getCurrectRoles(
- 'acquisitionQuality.initial'
- )) {
- that.gridList.statusFlag =
- 7
- } else {
- that.gridList.statusFlag =
- 0
- }
- }
- that.gridList.warehouseInOutId =
- res.data.data
- if(that.gridList.warehouseInOutId){
- that.$api.doRequest('post',
- '/qualityInspectionManagement/api/addQualityInspection',
- that.gridList)
- .then(res => {
- that.printId=res.data.data
- uni.hideLoading()
- if (res.data.code ==
- 200) {
- that.$api.msg(
- '提交成功')
- that.gridList
- .warehouseId =
- that
- .cangid
- that.gridList
- .compId =
- uni
- .getStorageSync(
- 'pcUserInfo'
- )
- .compId
- uni.setStorageSync(
- "quality_print",
- that
- .gridList)
- if (that.utils
- .getCurrectRoles(
- 'acquisitionQuality.initial'
- )) {
- that.isShowPrint =
- true
- } else {
- uni.navigateBack({})
- }
- uni.setStorageSync('checkcustomer',{})
- console.log(
- 'that.gridList',
- that
- .gridList)
- // uni.navigateBack({})
- } else {
- that.$api.msg(
- '提交失败')
- }
- })
- }
- else{
- uni.hideLoading()
- }
- }
- else{
- uni.hideLoading()
- }
- })
-
- }
- }
- }
- }
- })
- } else {
- uni.showLoading({
- title: '加载中',
- mask: true
- })
- that.gridList.inOutFlag = 2
- that.$api.doRequest('post',
- '/warehouseInOutInfo/InOutWarehouse',
- that.gridList)
- .then(res => {
- that.gridList.warehouseInOutId = res.data.data
- if(that.gridList.warehouseInOutId){
- that.$api.doRequest('post',
- '/qualityInspectionManagement/api/addQualityInspection',
- that.gridList)
- .then(res => {
- console.log(res)
- that.printId=res.data.data
- uni.hideLoading()
- if (res.data.code == 200) {
- that.$api.msg('提交成功')
- that.gridList.warehouseId = that.cangid
- that.gridList.compId = uni.getStorageSync(
- 'pcUserInfo').compId
- uni.setStorageSync("quality_print", that
- .gridList)
- if (that.utils.getCurrectRoles(
- 'acquisitionQuality.initial')) {
- that.isShowPrint = true
- } else {
- uni.navigateBack({})
- }
-
- console.log('that.gridList', that.gridList)
- // uni.navigateBack({})
- } else {
- that.$api.msg('提交失败')
- }
- })
- }
- else{
- uni.hideLoading()
- }
-
- })
- }
- }
- }
- })
- } else {
- text = "确定提交质检信息?"
- this.gridList.brazer = 0
- this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
- warehouseId: this.cangid
- }).then(res => {
- if (res.data.code != 200 && that.typevalue == 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.gridList.serviceManagementType = that.typevalue
- if (that.typevalue == 3) {
- uni.showLoading({
- title: '加载中',
- mask: true
- })
- that.$api.doRequest('get', '/paymentManagement/cumulant', {
- compId: uni.getStorageSync('pcUserInfo')
- .compId,
- customerNumberCard: that.gridList
- .customerNumberCard,
- goodsName: that.gridList.goodsName,
- })
- .then(response => {
- if (response.data.code == 200) {
- for (let i = 0; i < that.purchasePriceList
- .length; i++) {
- if (
- that.gridList.goodsName == that
- .purchasePriceList[i]
- .goodsName
- ) {
- let count = (that
- .purchasePriceList[i]
- .saleLimit -
- response.data.data / 1000)
- .toFixed(2)
- console.log(count, that
- .purchasePriceList[i]
- .saleLimit,
- response.data.data)
- if (Number(count) <= 0) {
- count = 0
- that.$api.msg('该客户累计销售' + that
- .gridList.goodsName +
- (
- response.data
- .data / 1000)
- .toFixed(2) +
- '吨,还可售粮' +
- count + '吨', )
- uni.hideLoading()
- } else {
- that.gridList.inOutFlag = 2
- that.$api.doRequest('post',
- '/warehouseInOutInfo/InOutWarehouse',
- that.gridList)
- .then(res => {
- if (that.utils
- .getCurrectRoles(
- 'acquisitionQuality.qview'
- )) {
- if (!that.utils
- .getCurrectRoles(
- 'acquisitionQuality.initial'
- )) {
- that.gridList
- .statusFlag =
- 7
- } else {
- that.gridList
- .statusFlag =
- 0
- }
- }
- that.gridList.warehouseInOutId =
- res.data.data
- if(that.gridList.warehouseInOutId){
- that.$api.doRequest(
- 'post',
- '/qualityInspectionManagement/api/addQualityInspection',
- that.gridList)
- .then(res => {
- that.printId=res.data.data
- uni.hideLoading()
- if (res
- .data
- .code ==
- 200
- ) {
- that.$api
- .msg(
- '提交成功'
- )
- that.gridList
- .warehouseId =
- that
- .cangid
- that.gridList
- .compId =
- uni
- .getStorageSync(
- 'pcUserInfo'
- )
- .compId
- uni.setStorageSync(
- "quality_print",
- that
- .gridList
- )
- if (that
- .utils
- .getCurrectRoles(
- 'acquisitionQuality.initial'
- )
- ) {
- that.isShowPrint =
- true
- } else {
- uni.navigateBack({})
- }
-
- console
- .log(
- 'that.gridList',
- that
- .gridList
- )
- // uni.navigateBack({})
- } else {
- that.$api
- .msg(
- '提交失败'
- )
- }
- })
- }
- else{
- uni.hideLoading()
- }
- })
- }
- }
- }
- }
- })
- } else {
- uni.showLoading({
- title: '加载中',
- mask: true
- })
- that.gridList.inOutFlag = 2
- that.$api.doRequest('post',
- '/warehouseInOutInfo/InOutWarehouse',
- that.gridList)
- .then(res => {
- that.gridList.warehouseInOutId = res.data.data
-
- if(that.gridList.warehouseInOutId){
- that.$api.doRequest('post',
- '/qualityInspectionManagement/api/addQualityInspection',
- that.gridList)
- .then(res => {
- that.printId=res.data.data
- uni.hideLoading()
- if (res.data.code == 200) {
- that.$api.msg('提交成功')
- that.gridList.warehouseId =
- that.cangid
- that.gridList.compId = uni
- .getStorageSync(
- 'pcUserInfo').compId
- uni.setStorageSync(
- "quality_print", that
- .gridList)
- if (that.utils.getCurrectRoles(
- 'acquisitionQuality.initial'
- )) {
- that.isShowPrint = true
- } else {
- uni.navigateBack({})
- }
-
- console.log('that.gridList',
- that.gridList)
- // uni.navigateBack({})
- } else {
- that.$api.msg('提交失败')
- }
- })
- }
- else{
- uni.hideLoading()
- }
- })
- }
- }
- }
- })
- }
- })
- }
- // if (!this.gridList.storageTagNo) {
- // this.$api.msg('囤位号不能为空')
- // return
- // }
- // if (this.gridList.storageTagNo&&this.gridList.storageTagNo.length > 10) {
- // this.$api.msg('囤位号不能为空')
- // return
- // }
- // if (this.gridList.buckleWeightRatio < 0 || this.gridList.buckleWeightRatio > 2) {
- // this.$api.msg('扣重比输入错误')
- // return
- // }
- // if (
- // String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
- // String(this.gridList.buckleWeightRatio).length -
- // (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
- // this.$api.msg('扣重比输入错误')
- // return
- // }
- // uni.showModal({
- // content: text,
- // showCancel: true,
- // confirmText: '提交',
- // success: function(res) {
- // if (res.confirm) {
- // that.gridList.serviceManagementType = that.typevalue
- // if (that.typevalue == 3) {
- // that.$api.doRequest('get', '/paymentManagement/cumulant', {
- // compId: uni.getStorageSync('pcUserInfo').compId,
- // customerNumberCard: that.gridList.customerNumberCard,
- // goodsName: that.gridList.goodsName,
- // })
- // .then(response => {
- // if (response.data.code == 200) {
- // for (let i = 0; i < that.purchasePriceList.length; i++) {
- // if (
- // that.gridList.goodsName == that.purchasePriceList[i]
- // .goodsName
- // ) {
- // let count = (that.purchasePriceList[i].saleLimit -
- // response.data.data / 1000).toFixed(2)
- // console.log(count, that.purchasePriceList[i].saleLimit,
- // response.data.data)
- // if (Number(count) <= 0) {
- // count = 0
- // that.$api.msg('该客户累计销售' + that.gridList.goodsName +
- // (
- // response.data.data / 1000).toFixed(2) +
- // '吨,还可售粮' +
- // count + '吨', )
- // } else {
- // that.gridList.inOutFlag = 2
- // that.$api.doRequest('post',
- // '/warehouseInOutInfo/InOutWarehouse',
- // that.gridList)
- // .then(res => {
- // if (that.utils.getCurrectRoles(
- // 'acquisitionQuality.qview')) {
- // if (!that.utils.getCurrectRoles(
- // 'acquisitionQuality.initial'
- // )) {
- // that.gridList.statusFlag = 7
- // } else {
- // that.gridList.statusFlag = 0
- // }
- // }
- // that.gridList.warehouseInOutId = res
- // .data.data
- // that.$api.doRequest('post',
- // '/qualityInspectionManagement/api/addQualityInspection',
- // that.gridList)
- // .then(res => {
- // if (res.data.code == 200) {
- // that.$api.msg('提交成功')
- // that.gridList
- // .warehouseId = that
- // .cangid
- // that.gridList.compId =
- // uni.getStorageSync(
- // 'pcUserInfo')
- // .compId
- // uni.setStorageSync(
- // "quality_print",
- // that.gridList)
- // if (that.utils
- // .getCurrectRoles(
- // 'acquisitionQuality.initial'
- // )) {
- // that.isShowPrint =
- // true
- // } else {
- // uni.navigateBack({})
- // }
- // console.log(
- // 'that.gridList',
- // that.gridList)
- // // uni.navigateBack({})
- // } else {
- // that.$api.msg('提交失败')
- // }
- // })
- // })
- // }
- // }
- // }
- // }
- // })
- // } else {
- // that.gridList.inOutFlag = 2
- // that.$api.doRequest('post',
- // '/warehouseInOutInfo/InOutWarehouse',
- // that.gridList)
- // .then(res => {
- // that.gridList.warehouseInOutId = res.data.data
- // that.$api.doRequest('post',
- // '/qualityInspectionManagement/api/addQualityInspection',
- // that.gridList)
- // .then(res => {
- // if (res.data.code == 200) {
- // that.$api.msg('提交成功')
- // that.gridList.warehouseId = that.cangid
- // that.gridList.compId = uni.getStorageSync(
- // 'pcUserInfo').compId
- // uni.setStorageSync("quality_print", that.gridList)
- // if (that.utils.getCurrectRoles(
- // 'acquisitionQuality.initial')) {
- // that.isShowPrint = true
- // } else {
- // uni.navigateBack({})
- // }
- // console.log('that.gridList', that.gridList)
- // // uni.navigateBack({})
- // } else {
- // that.$api.msg('提交失败')
- // }
- // })
- // })
- // }
- // }
- // }
- // })
- },
- 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()
- },
- setGoodName(e, status) {
- // console.log(this.goodsList[e[0]].goodsName,111111111)
- //
- // [e[0]] = 0
- // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
- if (this.goodsList[e[0]].goodsName == '玉米') {
- this.gridList.type = '干粮'
- this.edit = true
- } else if (this.goodsList[e[0]].goodsName.indexOf('潮粮') > -1) {
- this.gridList.type = '潮粮'
- this.edit = true
- } else {
- this.gridList.type = '干粮'
- this.edit = false
- }
- var that = this
- this.gridList.goodsName = this.goodsList[e[0]].goodsName
- // this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
- // warehouseId: this.cangid,
- // goodsName: this.gridList.goodsName
- // }).then(res => {
- // if (res.data.data) {
- // uni.hideLoading()
- // // let data = res.data.data
- // // that.gridList =data
- // }
- // })
- uni.setStorageSync('goodsName', this.gridList.goodsName)
- if (this.gridList.type == "干粮" && this.gridList.goodsName) {
- if (this.inType == "收购入库") { //收购入库 价格取自合同
- return
- }
- if (!status) {
- uni.showLoading({
- title: '加载中',
- mask: true
- })
- }
- this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
- warehouseId: this.cangid,
- goodsName: this.gridList.goodsName
- }).then(res => {
- this.gridList.dryGrainPrice = res.data.data
- if (!status) {
- uni.hideLoading()
- }
- })
- }
- this.waterContentChange()
- },
- goodspicker(e) {
- console.log(e)
- this.setGoodName(e)
- },
- typepicker(e) {
- var that = this
- this.gridList.type = this.typeList[e[0]]
- if (this.inType == "收购入库") { //收购入库 价格取自合同
- return
- }
- if (this.gridList.type == "干粮" && this.gridList.goodsName) {
- this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
- warehouseId: this.cangid,
- goodsName: this.gridList.goodsName
- }).then(res => {
- that.gridList.dryGrainPrice = res.data.data
- })
- }
- },
- binNumberpicker(e) {
- console.log(this.warehouseList[e[0]])
- this.gridList.binNumber = this.warehouseList[e[0]].binNumber
- this.gridList.positionId = this.warehouseList[e[0]].id
- },
- 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>
- page {
- background: #F5F6FA;
- }
- .title_b {
- margin: 20rpx 20rpx 0rpx 20rpx;
- padding: 20rpx 10rpx 20rpx 10rpx;
- font-size: 18px;
- font-weight: 550;
- }
- .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;
- }
- .wrap {
- padding-bottom: 10px;
- font-size: 14px;
- background: #fff;
- margin: 10px;
- border-radius: 10px;
- input {
- font-size: 14px;
- }
- >.title {
- padding: 10px 16px;
- }
- }
- .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;
- }
- }
- .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;
- }
- /deep/.u-radio-group {
- flex-direction: row-reverse;
- }
- </style>
|