123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190 |
- <template>
- <div class="center">
- <BaseHeaderLayout :leftSpan="12">
- <template slot="left">
- </template>
- <template slot="right">
- <el-select v-model="warehouseName" filterable placeholder="" @change="warehouseNameChange" :value="searchType">
- <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
- style="color: #8890b1" />
- </el-select>
- </template>
- </BaseHeaderLayout>
- <div style="display: flex;">
- <div style="background: #f6f7fc; padding: 10px" class="grid-content bg-purple size_css">
- <BalanceAlert v-if="isShowBalance" ref="weightChild" :deptBudgetList="deptBudgetList" :information="information"
- v-on:balanceListen="setVal" class="zujian">
- </BalanceAlert>
- <div class="top">
- <div class="confirmWeight">
- <div class="titleWeight">确认重量</div>
- <div v-if="index == 0" class="weight">
- {{ weighingList.tare }} <span class="kg-style">kg</span>
- </div>
- <div v-else class="weight">
- {{ weighingList.grossWeight }} <span class="kg-style">kg</span>
- </div>
- </div>
- <div class="confirmInfo">
- <div class="car-type">车牌号</div>
- <div class="car-no">{{ weighingList.carNumber }}</div>
- </div>
- <!-- <el-button @click="weightweight" type="success" plain>确定</el-button> -->
- </div>
- <div class="bg-left titleup">
- <span class="word_css">实时监控</span>
- </div>
- <div class="bottom">
- <div v-if="!monitorUrl1" class="video1">
- <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
- <div>监控视频未连接</div>
- </div>
- <div v-else class="video1">
- <iframe :src="monitorUrl1" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
- mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
- </div>
- <div v-if="!monitorUrl2" class="video1">
- <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
- <div>监控视频未连接</div>
- </div>
- <div v-else class="video2">
- <iframe :src="monitorUrl2" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
- mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
- </div>
- </div>
- </div>
- <div>
- <el-row :gutter="20">
- <el-col :span="12">
- <div class="grid-content bg-purple">
- <div class="tab weigh_btn">
- <el-button :type="tpyeNo == 1 ? 'primary' : ''">
- <!-- <el-badge :value="mListTop.length" class="badge_item"> -->
- <div @click="tabClick(0)">称皮重</div>
- </el-button>
- <!-- </el-badge> -->
- <el-button :type="tpyeNo == 2 ? 'primary' : ''">
- <!-- <el-badge :value="pListTop.length" class="badge_item"> -->
- <div @click="tabClick(1)">称毛重</div>
- <!-- </el-badge> -->
- </el-button>
- </div>
- <ws-form class="right-content">
- <div class="left1">
- <div class="weightInfo">
- <ws-info-table>
- <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
- <el-select v-if="tpyeNo == 1" :disabled="recheck" filterable clearable
- v-model="weighingList.inOutTaskNo" placeholder="请选择任务编号" class="typeselect"
- @change="contractNoChange">
- <el-option v-for="item in taskNolist" :key="item.id" :label="item.inOutTaskNo"
- :value="item.inOutTaskNo" />
- </el-select>
- <ws-input v-else v-model="weighingList.inOutTaskNo" placeholder="自动获取,不可编辑" maxlength="100"
- disabled size="small" />
- </ws-form-item>
- <!-- <ws-form-item label="业务编号" span="1" prop="number">
- <ws-input v-model="weighingList.number" placeholder="自动获取,不可编辑" maxlength="100" disabled
- size="small" />
- </ws-form-item> -->
- <ws-form-item label="合同编号" span="1" prop="contractNo" v-show="inWarehouseType == 1"
- v-if="weighingList.contractNo && tpyeNo == 1">
- <ws-input v-model="weighingList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
- size="small" />
- </ws-form-item>
- <ws-form-item label="移库编号" span="1" prop="moveTaskNo" v-show="inWarehouseType == 1"
- v-if="!weighingList.contractNo && tpyeNo == 1">
- <ws-input v-model="weighingList.moveTaskNo" placeholder="自动获取,不可编辑" maxlength="100" size="small"
- disabled />
- </ws-form-item>
- <ws-form-item v-if="tpyeNo == 1" label="提示" span="1" prop="tips">
- <ws-input v-model="weighingList.tips" placeholder="自动获取,不可编辑" maxlength="100" disabled
- size="small" />
- </ws-form-item>
- <ws-form-item label="货名" span="1" prop="goodsName">
- <ws-input v-model="weighingList.goodsName" placeholder="自动获取,不可编辑" maxlength="100" disabled
- size="small" />
- </ws-form-item>
- <ws-form-item v-if="tpyeNo == 1 && warehouseType == 1" label="仓位号" span="1" prop="inOutTaskNo">
- <el-select @change="binNumberchange" :disabled="recheck" filterable clearable
- v-model="weighingList.binNumber" placeholder="请选择仓位号" class="typeselect">
- <el-option v-for="item in positionInfos" :key="item.id" :label="item.binNumber"
- :value="item.binNumber" />
- </el-select>
- </ws-form-item>
- <ws-form-item v-if="tpyeNo == 1 && warehouseType == 1" label="囤位号" span="1" prop="storageNumber">
- <ws-input :disabled="recheck" v-model="weighingList.storageNumber" placeholder="选填,1-10个字符"
- maxlength="10" size="small" />
- </ws-form-item>
- <ws-form-item label="价格" span="1" prop="contractPrice">
- <ws-input :disabled="recheck" v-model="weighingList.contractPrice" placeholder="请输入价格(元/吨)"
- maxlength="10" size="small" />
- </ws-form-item>
- <ws-form-item v-if="tpyeNo == 2" label="备注" span="1" prop="customer">
- <ws-input :disabled="recheck" v-model="weighingList.customer" placeholder="请输入备注"
- maxlength="10" size="small" />
- </ws-form-item>
- <ws-form-item v-if="tpyeNo == 1" label="出库类型" span="1">
- <ws-input v-model="weighingList.inOutType" class="right-bottom" disabled
- placeholder="自动获取,不可编辑" />
- <!-- :disabled="isSelectType" -->
- </ws-form-item>
- <ws-form-item v-if="tpyeNo == 1" label="出库日期" span="1" prop="inOutDate" class="deliverydate">
- <ws-date-picker v-model="weighingList.inOutDate" type="date" placeholder="请选择出库日期"
- value-format="yyyy-MM-dd" />
- </ws-form-item>
- <ws-form-item label="运输方式" span="1" prop="outType">
- <el-select v-model="weighingList.outType" placeholder="请选择运输方式" :disabled="recheck1">
- <el-option v-for="item in multiSelector" :key="item.value" :label="item.name"
- :value="item.name" />
- </el-select>
- </ws-form-item>
- <ws-form-item v-if="fleetNameList.length > 0 && tpyeNo == 1" label="车队" span="1" prop="fleetName">
- <el-select :disabled="recheck" v-model="deptBudgetList.fleet" placeholder="非车队车辆">
- <el-option v-for="item in fleetNameList" :key="item.value" :label="item.fleetName"
- :value="item.fleetName" />
- </el-select>
- </ws-form-item>
- <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
- weighingList.outType == '汽运' ||
- weighingList.outType == '集装箱船'
- ">
- <el-input v-if="!carstatus || carjudge" v-model="weighingList.carNo" placeholder="请输入车牌号"
- size="small" :disabled="recheck1"/>
- <el-select v-else filterable clearable v-model="weighingList.carNo" placeholder="请选择车牌号"
- class="typeselect" @change="carChange" :disabled="recheck1">
- <el-option v-for="item in options2" :key="item.constKey"
- :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
- </el-select>
- <el-button type="primary" @click="carNoTypeChange" v-if="carstatus">{{ carChange1 }}</el-button>
- </ws-form-item>
- <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
- weighingList.outType == '汽运' ||
- weighingList.outType == '集装箱船'
- ">
- <ws-input v-model="weighingList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" :disabled="recheck1"/>
- </ws-form-item>
- <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
- weighingList.outType == '汽运' ||
- weighingList.outType == '集装箱船'
- ">
- <ws-input v-model="weighingList.titleNo" placeholder="请输入封号" maxlength="20" size="small" :disabled="recheck1"/>
- </ws-form-item>
- <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
- weighingList.outType == '汽运' ||
- weighingList.outType == '集装箱船'
- ">
- <ws-input v-model="weighingList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" :disabled="recheck1"/>
- </ws-form-item>
- <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
- weighingList.outType == '汽运' ||
- weighingList.outType == '集装箱船'
- ">
- <ws-input v-model="weighingList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" :disabled="recheck1"/>
- </ws-form-item>
- <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="weighingList.outType == '火运'">
- <ws-input v-model="weighingList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
- </ws-form-item>
- <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="weighingList.outType == '火运'">
- <ws-input v-model="weighingList.wingNumberOther" placeholder="请输入车厢号" maxlength="20"
- size="small" />
- </ws-form-item>
- <ws-form-item label="船名" span="1" prop="shipName" v-if="weighingList.outType == '散船'">
- <ws-input v-model="weighingList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
- </ws-form-item>
- <ws-form-item label="航次" span="1" prop="shipNumber" v-if="weighingList.outType == '散船'">
- <ws-input v-model="weighingList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
- </ws-form-item>
- <ws-form-item v-if="tpyeNo == 2" label="毛重(KG)" span="1" prop="grossWeight">
- <ws-input type="number" @mousewheel.native.prevent v-if="tpyeNo == 2"
- v-model="weighingList.grossWeight" @input="calculation" placeholder="未获取到毛重" maxlength="100"
- size="small" :disabled="disabled" />
- <el-button v-if="tpyeNo == 2 && warehouseType == 1" @click="openPort">重新获取</el-button>
- <el-button v-if="tpyeNo == 2 && warehouseType == 2" @click="disabled = false">编辑</el-button>
- </ws-form-item>
- <ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="information == '毛重'">
- <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare"
- @input="calculation" placeholder="未获取到皮重" maxlength="100" size="small" disabled />
- </ws-form-item>
- <ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="information == '皮重'">
- <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare"
- @input="calculation" placeholder="未获取到皮重" maxlength="100" size="small" :disabled="disabled" />
- <el-button v-if="tpyeNo == 1 && warehouseType == 1" @click="openPort">重新获取</el-button>
- <el-button v-if="tpyeNo == 1 && warehouseType == 2" @click="disabled = false">编辑</el-button>
- </ws-form-item>
- <div class="formItem">
- <!-- <ws-form-item label="扣重(KG)" span="1" prop="buckleMiscellaneous" v-if="
- information == '毛重' &&
- (paramType == '2' || inWarehouseType == 1)
- ">
- <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous"
- @input="calculation" placeholder="请输入扣重" maxlength="100" size="small" />
- </ws-form-item> -->
- <ws-form-item label="净重(KG)" span="1" prop="netWeight" v-if="information == '毛重'">
- <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.netWeight"
- placeholder="自动计算,不可编辑" maxlength="100" size="small" disabled />
- </ws-form-item>
- <!-- <ws-form-item label="应收卸车过磅费(元)" span="1" prop="receivableWeighingFee" v-if="index == 1">
- <ws-input type="number" v-model="weighingList.receivableWeighingFee" placeholder="未获取到卸车过磅费金额"
- maxlength="100" size="small" disabled />
- </ws-form-item>
- <ws-form-item label="实收卸车过磅费(元)" span="1" prop="actualWeighingFee" v-if="index == 1">
- <ws-input type="number" v-model="weighingList.actualWeighingFee" placeholder="输入卸车过磅费" maxlength="100"
- size="small" />
- </ws-form-item> -->
- </div>
- </ws-info-table>
- <div class="but">
- <!-- <el-button @click="print" type="primary" :disabled="submitAllow">提交</el-button> -->
- <el-button @click="print" v-if="information == '毛重'" type="primary">提交</el-button>
- <el-button @click="print" v-if="information == '皮重'" type="primary" :disabled="submitAllow">提交
- </el-button>
- </div>
- <!-- <div>
- <div>粮源</div>
- <div class='stocks' v-for='(item,index) in stocks'>
- <el-select v-model="item.warehouseName" filterable placeholder="选择所属仓库" @change="warehouseNameChange" :value="searchType">
- <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
- style="color: #8890b1" />
- </el-select>
- <el-select v-model="item.warehouseName" filterable placeholder="选择货名" @change="warehouseNameChange" :value="searchType">
- <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
- style="color: #8890b1" />
- </el-select>
- <ws-input v-model="item.cost" placeholder="输入重量" maxlength="100"
- size="small" />
- <img class='add' @click='addstocks(index)' style='width:20px;height:20px;' src="../../../public/img/add.png" alt="">
- <img class='del' @click='delstocks(index)' style='width:20px;height:20px;' src="../../../public/img/del.png" alt="">
- </div>
- </div> -->
- <!-- </div> -->
- </div>
- </div>
- </ws-form>
- </div>
- </el-col>
- <el-col :span="12">
- <div class="list-info">
- <div style="justify-content: space-between;" class="flex">
- <div style="min-width:146px;">
- <el-button v-if="tpyeNo == 1" @click="add" type="primary">新增</el-button>
- <el-button v-if="tpyeNo == 1" @click="deletelist" type="danger">删除</el-button>
- <el-button v-if="tpyeNo == 2" @click="statustypechangelist(3)"
- :type="statusType == 3 ? 'primary' : ''">未称毛重
- </el-button>
- <el-button v-if="tpyeNo == 2" @click="statustypechangelist(2)"
- :type="statusType == 2 ? 'primary' : ''">已称毛重
- </el-button>
- </div>
- <div style="display: flex;">
- <el-button @click='refreshClick(1)' type="primary">刷新</el-button>
- <el-button @click='refreshClick' type="primary">{{timer?refresh:'自动刷新'}}</el-button>
- <el-button @click="record" type="primary">记录</el-button>
- </div>
- </div>
- <el-table @cell-click="listclick" :data="deliveryList" style="width: 100%; margin-top: 20px"
- ref="deliveryList" border>
- <el-table-column prop="number" width="120" label="业务编号"></el-table-column>
- <el-table-column prop="carNumber" label="车牌号"></el-table-column>
- <el-table-column prop="status" label="状态"></el-table-column>
- </el-table>
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
- :current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
- :total="deptBudgetTotal">
- </el-pagination>
- </div>
- </el-col>
- </el-row>
- </div>
- </div>
- <!-- @opened="opendBtn" -->
- <el-dialog width="70%" class="title_css" center :visible.sync="isShowPrint" title="出库检斤单" @close="closeDialog"
- :close-on-click-modal="false">
- <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
- <div style="text-align: center">
- <el-button type="primary" @click="closePrint">关闭</el-button>
- <el-button type="primary" @click="printSmall">打印小票</el-button>
- <el-button type="primary" @click="printBig">打印单据</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- grossWeight,
- getbinNumber,
- contractListWeighing,
- tareAdd,
- tareEdit,
- getweighing,
- getweighingList,
- selectWarehouseSelf,
- delelteWeighing,
- newSubmit,
- getInfo
- } from '@/model/outboundManagement/index'
- import {
- pullDown,
- addstorageputList,
- xialaNo,
- getstaff,
- getReceiptTaskNo,
- } from '@/model/warehouse/index'
- import axios from 'axios'
- import weightCheckPrint from './component/weightCheckPrint.vue'
- import inspectInfoPrint from './component/inspectInfoPrint.vue'
- import html2canvas from 'html2canvas'
- import WsUpload from '@/components/WsUpload'
- import BalanceAlert from '@/components/balanceAlert'
- import {
- EventBus
- } from 'base-core-lib'
- export default {
- components: {
- WsUpload,
- inspectInfoPrint,
- weightCheckPrint,
- BalanceAlert
- },
- data() {
- return {
- timer: '',
- refresh: 60,
- isShowBalance: false,
- isShowPrint: false,
- warehouseName: '',
- warehouseList: [],
- warehouseList1: [],
- currentPage: 1,
- pageSize: 50,
- submitAllow: false,
- deliveryList: [],
- inOutTypeList:[],
- positionInfos: [],
- searchKeyWord: '',
- paramType: '',
- deptBudgetTotal: 0,
- monitorUrl1: '',
- monitorUrl2: '',
- index: 0,
- inspect: {},
- stocks: [{
- warehouseName: '',
- weight: '',
- cost: ''
- }],
- id: 0,
- options2: [],
- isSelectType: false,
- recheck: false,
- recheck1:false,
- recheckPrice:false,
- disabled: true,
- pListTop: [],
- tpyeNo: 1,
- types: null,
- information: '皮重',
- carChange1: '手动填写',
- inWarehouseType: 1, //入库类型
- outContractNo: [],
- mListTop: [],
- searchType: '',
- taskNolist: [],
- storageType: [],
- fleetNameList: [],
- carstatus: false,
- carjudge: false,
- warehouseCount: '',
- warehouseCount1: 0,
- warehouseNo: '',
- statusType: '3',
- warehouseType: 1,
- weighingList: {
- grossWeight: '',
- tare: '',
- buckleMiscellaneous: 0,
- netWeight: 0,
- weight: '',
- tips: '',
- carNo:'1231321',
- // contractNo:'',
- // inOutTaskNo:'',
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- inOutDate: ''
- },
- carWeightInfo: {
- carNumber: '',
- type: '',
- weight: '',
- },
- deptBudgetList: {},
- multiSelector: [{
- name: '汽运',
- value: '0',
- },
- {
- name: '火运',
- value: '1',
- },
- {
- name: '集装箱船',
- value: '2',
- },
- {
- name: '散船',
- value: '3',
- },
- ],
- }
- },
- beforeDestroy() {
- if (this.timer) { //如果定时器还在运行 或者直接关闭,不用判断
- clearInterval(this.timer); //关闭
- }
- },
- mounted() {
- this.getNowTime()
- this.selectWarehouse()
- this.showType = this.isShow
- this.isShowBalance = true
- this.openPort()
- if (localStorage.getItem('houseSelfCollect_house1')) {
- if (localStorage.getItem('houseSelfCollect_house1').allowEdit == 1) {
- this.disabled = false
- } else {
- this.disabled = true
- }
- }
- },
- activated() {},
- methods: {
- addstocks(index) {
- this.stocks.push({
- warehouseName: '',
- cost: ''
- })
- },
- delstocks(index) {
- this.stocks.splice(index, 1)
- },
- refreshClick(type) {
- let that = this
- if (type == 1) {
- getweighingList({
- compId: localStorage.getItem('ws-pf_compId'),
- currentPage: that.currentPage,
- pageSize: that.pageSize,
- searchKeyWord: that.searchKeyWord,
- warehouseName: that.warehouseName,
- managementType: 3,
- statusType: that.statusType,
- // loadingstatus: 1,
- })
- .toPromise()
- .then((response) => {
- that.deliveryList = response.records
- that.deptBudgetTotal = response.total
- for (var i = 0; i < response.records.length; i++) {
- if (response.records[i].addressUrl != null) {
- if (response.records[i].addressUrl) {
- response.records[i].addressUrlArray =
- response.records[i].addressUrl.split(',')
- }
- } else {
- response.records[i].addressUrlArray = []
- }
- }
- for (var i = 0; i < response.records.length; i++) {
- var arr = new Array()
- that.addressUrls[i] = new Array()
- if (that.weighingList.records[i].addressUrl != null) {
- arr = that.weighingList.records[i].addressUrl.split(',')
- that.addressUrls[i] = arr
- }
- }
- })
- .catch((response) => {})
- } else {
- clearInterval(that.timer)
- that.refresh = 60
- that.timer = setInterval(function() {
- console.log(that.refresh)
- if (that.refresh == 0) {
- that.refresh = 60
- getweighingList({
- compId: localStorage.getItem('ws-pf_compId'),
- currentPage: that.currentPage,
- pageSize: that.pageSize,
- searchKeyWord: that.searchKeyWord,
- warehouseName: that.warehouseName,
- managementType: 3,
- statusType: that.statusType,
- loadingstatus: 1,
- })
- .toPromise()
- .then((response) => {
- that.deliveryList = response.records
- that.deptBudgetTotal = response.total
- for (var i = 0; i < response.records.length; i++) {
- if (response.records[i].addressUrl != null) {
- if (response.records[i].addressUrl) {
- response.records[i].addressUrlArray =
- response.records[i].addressUrl.split(',')
- }
- } else {
- response.records[i].addressUrlArray = []
- }
- }
- for (var i = 0; i < response.records.length; i++) {
- var arr = new Array()
- that.addressUrls[i] = new Array()
- if (that.weighingList.records[i].addressUrl != null) {
- arr = that.weighingList.records[i].addressUrl.split(',')
- that.addressUrls[i] = arr
- }
- }
- })
- .catch((response) => {})
- }
- that.refresh--
- }, 1000);
- }
- },
- statustypechangelist(status) {
- this.statusType = status
- this.getList()
- },
- getNowTime() {
- var now = new Date()
- var year = now.getFullYear() //得到年份
- var month = now.getMonth() //得到月份
- var date = now.getDate() //得到日期
- month = month + 1
- month = month.toString().padStart(2, '0')
- date = date.toString().padStart(2, '0')
- var defaultDate = `${year}-${month}-${date}`
- this.$set(this.weighingList, 'inOutDate', defaultDate)
- },
- record() {
- this.$router.push({
- path: 'weighingManagementrecord',
- query: {
- warehouseName: this.warehouseName
- },
- })
- },
- closePrint() {
- this.isShowPrint = false
- },
- printSmall() {
- // localStorage.setItem('inspect', JSON.stringify(this.inspect))
- // window.open('../../../static/weightChecknew.html?type=1')
- localStorage.setItem('ck_bd_printData1', JSON.stringify(this.inspect))
- window.open('../../../../static/outWeightPrint.html?type=1&other="true"')
- },
- printBig() {
- localStorage.setItem('ck_bd_printData1', JSON.stringify(this.inspect))
- window.open('../../../../static/outWeightPrint.html?type=2&other="true"')
- // window.open('../../../static/weightChecknew.html?type=2&dataList=' + JSON.stringify(this.inspect))
- },
- opendBtn() {
- html2canvas(this.$refs.saveImg.$el).then((canvas) => {
- let dataURL = canvas.toDataURL('image/png')
- this.imgUrl = dataURL
- if (this.imgUrl !== '') {
- let b = this.dataURLtoFile(this.imgUrl, 'printImg')
- let formdata = new FormData()
- formdata.append('file', b)
- axios({
- method: 'post',
- url: 'https://www.zthymaoyi.com/upload/admin',
- data: formdata,
- }).then((response) => {
- //编辑接口
- this.weighingList.pictureAddress = response.data.url
- console.log(this.types)
- if (this.types == 3) {
- this.weighingList.flag = 0
- } else if (this.types == 4) {
- this.weighingList.flag = 1
- }
- if (this.tpyeNo == 1) {
- tareEdit(this.weighingList)
- .toPromise()
- .then((response) => {
- this.types = ''
- this.weighingList = {
- grossWeight: '',
- tare: '',
- tips: '',
- // contractNo:'',
- // inOutTaskNo:'',
- buckleMiscellaneous: 0,
- netWeight: 0,
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- }
- // this.inspect = []
- })
- } else {
- grossWeight(this.weighingList)
- .toPromise()
- .then((response) => {
- this.types = ''
- this.weighingList = {
- grossWeight: '',
- tare: '',
- tips: '',
- // contractNo:'',
- // inOutTaskNo:'',
- buckleMiscellaneous: 0,
- netWeight: 0,
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- }
- // this.inspect = []
- })
- }
- })
- }
- })
- },
- closeDialog() {
- html2canvas(this.$refs.saveImg.$el).then((canvas) => {
- let dataURL = canvas.toDataURL('image/png')
- this.imgUrl = dataURL
- if (this.imgUrl !== '') {
- let b = this.dataURLtoFile(this.imgUrl, 'printImg')
- let formdata = new FormData()
- formdata.append('file', b)
- axios({
- method: 'post',
- url: 'https://www.zthymaoyi.com/upload/admin',
- data: formdata,
- }).then((response) => {
- //编辑接口
- this.weighingList.pictureAddress = response.data.url
- console.log(this.types)
- if (this.types == 3) {
- this.weighingList.flag = 0
- } else if (this.types == 4) {
- this.weighingList.flag = 1
- }
- if (this.tpyeNo == 1) {
- tareEdit(this.weighingList)
- .toPromise()
- .then((response) => {
- this.types = ''
- this.weighingList = {
- grossWeight: '',
- tare: '',
- tips: '',
- // contractNo:'',
- // inOutTaskNo:'',
- buckleMiscellaneous: 0,
- netWeight: 0,
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- }
- // this.inspect = []
- })
- } else {
- grossWeight(this.weighingList)
- .toPromise()
- .then((response) => {
- this.types = ''
- this.weighingList = {
- grossWeight: '',
- tare: '',
- tips: '',
- // contractNo:'',
- // inOutTaskNo:'',
- buckleMiscellaneous: 0,
- netWeight: 0,
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- }
- // this.inspect = []
- })
- }
- })
- this.dialogTableVisible = true
- }
- })
- },
- weightweight() {
- if (this.tpyeNo == 1) {
- this.weighingList.grossWeight = this.weighingList.weight
- } else {
- this.weighingList.tare = this.weighingList.weight
- }
- },
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`)
- this.pageSize = val
- this.getList()
- },
- handleCurrentChange(val) {
- this.currentPage = val
- console.log(`当前页: ${val}`)
- this.getList()
- },
- setVal(data) {
- if (this.information == '毛重') {
- this.weighingList.grossWeight = data
- this.weighingList.netWeight = Number(this.weighingList.grossWeight) - Number(this.weighingList.tare)
- } else {
- this.weighingList.tare = data
- }
- },
- openPort() {
- this.$refs.weightChild.openPort()
- },
- listclick(row) {
- this.id = row.id
- getweighing({
- id: row.id,
- })
- .toPromise()
- .then((response) => {
- this.weighingList = response
- if(response.inOutType == '移库出库' && this.warehouseType == '1'){
- this.recheckPrice = true
- }else{
- this.recheckPrice = false
- }
- this.carstatus=false
- // this.weighingList.carNo =
- // response.qualityInspectionManagement.carNumber
- this.$set(this.weighingList,'carNo', response.qualityInspectionManagement.carNumber)
- this.weighingList.boxNo = response.boxNo
- this.weighingList.boxNoOther = response.boxNoOther
- this.weighingList.titleNo = response.titleNo
- this.weighingList.titleNoOther = response.titleNoOther
- this.weighingList.wingNumber =
- response.qualityInspectionManagement.wingNumber
- this.weighingList.wingNumberOther =
- response.qualityInspectionManagement.wingNumberOther
- this.weighingList.warehouseInOutDetail = {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- }
- })
- // if(){
- // }
- // this.deptBudgetList=row
- // console.log(row)
- },
- add() {
- this.information = '皮重'
- this.weighingList = {
- grossWeight: 0,
- tare: 0,
- tips: '',
- // contractNo:'',
- // inOutTaskNo:'',
- buckleMiscellaneous: 0,
- netWeight: 0,
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- }
- },
- deletelist() {
- if (this.id) {
- delelteWeighing({
- id: this.id,
- })
- .toPromise()
- .then((response) => {
- this.$message({
- message: '删除成功!',
- type: 'success',
- })
- this.id = ''
- this.weighingList = {
- grossWeight: '',
- tare: '',
- tips: '',
- // contractNo:'',
- // inOutTaskNo:'',
- buckleMiscellaneous: 0,
- netWeight: 0,
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- }
- this.getList()
- })
- }
- },
- binNumberchange(e) {
- for (let i = 0; i < this.positionInfos.length; i++) {
- if (this.positionInfos[i].binNumber == e) {
- this.weighingList.positionId = this.positionInfos[i].id
- }
- }
- },
- print() {
- this.carjudge=false
- this.carChange1 = '手动填写'
- // if(this.tpyeNo==2){
- // if(this.weighingList.qualityInspectionManagement.status != '已质检'){
- // this.$message.error("该条信息未质检!")
- // return
- // }
- // }
- // for (var i = 0; i < this.outContractNo.length; i++) {
- // if (this.outContractNo[i].contractNo == this.weighingList.contractNo){
- // this.$set(this.weighingList,'customer',this.outContractNo[i].buyer)
- // }
- // }debugger
- // console.log(this.weighingList.customer)
- this.weighingList.carNumber = this.weighingList.carNo
- if (this.tpyeNo == 1 || this.tpyeNo == 2) {
- if (!this.weighingList.contractNo) {
- this.$message({
- message: '合同编号不能为空',
- type: 'warning',
- })
- return
- }
- if (!this.weighingList.binNumber && this.weighingList.warehouseType == 1) {
- this.$message({
- message: '仓位号不能为空',
- type: 'warning',
- })
- return
- }
- if (!this.weighingList.storageNumber) {
- this.$message({
- message: '囤位号不能为空',
- type: 'warning',
- })
- return
- }
- if (!this.weighingList.contractPrice && this.weighingList.inOutType != '移库出库') {
- this.$message({
- message: '价格不能为空',
- type: 'warning',
- })
- return
- }
- if (
- this.weighingList.storageNumber.length < 1 ||
- this.weighingList.storageNumber.length > 10
- ) {
- this.$message({
- message: '囤位号不超过10个字符!',
- type: 'warning',
- })
- return
- }
- if (!this.weighingList.carNumber) {
- this.$message({
- message: '车牌号不能为空',
- type: 'warning',
- })
- return
- }
- if (this.weighingList.carNumber.length != 7) {
- this.$message({
- message: '车牌号输入错误',
- type: 'warning',
- })
- return
- }
- if (!this.weighingList.inOutType) {
- this.$message({
- message: '出库类型不能为空',
- type: 'warning',
- })
- return
- }
- }
- if (!this.weighingList.binNumber&& this.weighingList.warehouseType == 1) {
- this.$message({
- message: '仓位号不能为空',
- type: 'warning',
- })
- return
- }
- if (this.tpyeNo == 1) {
- if (!this.weighingList.inOutType) {
- this.$message({
- message: '出库类型不能为空',
- type: 'warning',
- })
- return
- }
- if (!this.weighingList.tare) {
- this.$message({
- message: '皮重不能为空',
- type: 'warning',
- })
- return
- }
- if (
- isNaN(this.weighingList.tare) ||
- (String(this.weighingList.tare).indexOf('.') != -1 &&
- String(this.weighingList.tare).length -
- (String(this.weighingList.tare).indexOf('.') + 1) >
- 1) ||
- this.weighingList.tare < 1 ||
- this.weighingList.tare > 100000
- ) {
- this.$message({
- message: '皮重输入错误!',
- type: 'warning',
- })
- return
- }
- }
- if (this.types == 2) {
- if (!this.weighingList.grossWeight) {
- this.$message({
- message: '毛重不能为空',
- type: 'warning',
- })
- return
- }
- if (
- isNaN(this.weighingList.grossWeight) ||
- (String(this.weighingList.grossWeight).indexOf('.') != -1 &&
- String(this.weighingList.grossWeight).length -
- (String(this.weighingList.grossWeight).indexOf('.') + 1) >
- 1) ||
- this.weighingList.grossWeight < 1 ||
- this.weighingList.grossWeight > 100000
- ) {
- this.$message({
- message: '毛重输入错误!',
- type: 'warning',
- })
- return
- }
- if (this.weighingList.netWeight < 0) {
- this.$message({
- message: '净重不能为负',
- type: 'warning',
- })
- return
- }
- }
- this.weighingList.compId = localStorage.getItem('ws-pf_compId')
- this.weighingList.warehouseName = this.warehouseName
- this.weighingList.warehouseType = this.warehouseType
- this.$confirm('确定保存检斤信息?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- this.weighingList.inOutFlag = 1
- this.weighingList.statusFlag = 3
- // if (this.weighingList.grossWeight) {
- // this.weighingList.grossWeight = this.weighingList.grossWeight / 1000
- // }
- // if (this.weighingList.netWeight) {
- // this.weighingList.netWeight = this.weighingList.netWeight / 1000
- // }
- // this.weighingList.tare = this.weighingList.tare / 1000
- // if (this.weighingList.buckleMiscellaneous) {
- // this.weighingList.buckleMiscellaneous = this.weighingList.buckleMiscellaneous / 1000
- // }
- if (this.tpyeNo == 1) {
- // this.weighingList.serviceManagementType=2
- this.weighingList.statusFlag = 1
- this.weighingList.relationId = this.relationId
- this.weighingList.warehouseId = this.warehouseId
- this.weighingList.baseId = this.warehouseId
- this.weighingList.skinInspector =
- localStorage.getItem('ws-pf_staffName')
- if (this.weighingList.id) { //修改皮重
- var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
- weighingList1.id = this.weighingList.warehouseInOutId
- weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
- weighingList1.weighingManagement = this.weighingList
- if (weighingList1.tare) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
- weighingList1.tare = weighingList1.tare / 1000
- }
- if (weighingList1.netWeight) {
- weighingList1.netWeight = weighingList1.netWeight / 1000
- }
- newSubmit(weighingList1)
- .toPromise()
- .then((response) => {
- getweighing({
- id: this.weighingList.id
- })
- .toPromise().then((response) => {
- if (this.reader) {
- this.reader.cancel()
- }
- this.$notify({
- title: '成功',
- message: '提交成功',
- type: 'success',
- })
- this.getList()
- this.weighingList = response
- // this.warehouseCount = Number(this.warehouseCount) + 1
- // this.warehouseCount1 = Number(this.warehouseCount1) + 1
- this.inspect = JSON.parse(
- JSON.stringify(this.weighingList)
- )
- this.isShowPrint = true
- this.weighingList = {
- grossWeight: 0,
- tare: 0,
- tips: '',
- // contractNo:'',
- // inOutTaskNo:'',
- buckleMiscellaneous: 0,
- netWeight: 0,
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- }
- })
- })
- } else { //新增皮检信息
- this.weighingList.relationId = this.relationId
- this.weighingList.warehouseId = this.warehouseId
- this.weighingList.baseId = this.warehouseId
- this.weighingList.warehouseNo = this.warehouseNo
- var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
- weighingList1.id = this.weighingList.warehouseInOutId
- weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
- weighingList1.weighingManagement = this.weighingList
- if (weighingList1.tare) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
- weighingList1.tare = weighingList1.tare / 1000
- }
- if (weighingList1.netWeight) {
- weighingList1.netWeight = weighingList1.netWeight / 1000
- }
- newSubmit(weighingList1)
- .toPromise()
- .then((response) => {
- getweighing({
- id: response
- })
- .toPromise().then((response) => {
- if (this.reader) {
- this.reader.cancel()
- }
- this.$notify({
- title: '成功',
- message: '提交成功',
- type: 'success',
- })
- this.getList()
- this.weighingList = response
- // this.warehouseCount = Number(this.warehouseCount) + 1
- // this.warehouseCount1 = Number(this.warehouseCount1) + 1
- this.inspect = JSON.parse(
- JSON.stringify(this.weighingList)
- )
- this.isShowPrint = true
- this.weighingList = {
- grossWeight: 0,
- tare: 0,
- tips: '',
- // contractNo:'',
- // inOutTaskNo:'',
- buckleMiscellaneous: 0,
- netWeight: 0,
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- }
- })
- })
- }
- } else if (this.tpyeNo == 2) {
- this.weighingList.secretaryWeigher =
- localStorage.getItem('ws-pf_staffName')
- this.weighingList.warehouseId = this.warehouseId
- this.weighingList.baseId = this.warehouseId
- var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
- weighingList1.id = this.weighingList.warehouseInOutId
- weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
- weighingList1.weighingManagement = this.weighingList
- if (weighingList1.grossWeight) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
- weighingList1.grossWeight = weighingList1.grossWeight / 1000
- }
- if (weighingList1.netWeight) {
- weighingList1.netWeight = weighingList1.netWeight / 1000
- }
- if (weighingList1.tare) {
- weighingList1.tare = weighingList1.tare / 1000
- }
- newSubmit(weighingList1)
- .toPromise()
- .then((response) => {
- getweighing({
- id: response
- })
- .toPromise().then((response) => {
- this.weighingList = response
- this.inspect = JSON.parse(
- JSON.stringify(this.weighingList)
- )
- this.isShowPrint = true
- })
- if (this.reader) {
- this.reader.cancel()
- }
- // this.$notify.success({
- // title: '成功',
- // message: '提交成功',
- // })
- this.$notify({
- title: '成功',
- message: '提交成功',
- type: 'success',
- })
- this.inspect = JSON.parse(JSON.stringify(this.weighingList))
- this.isShowPrint = true
- this.weighingList = {
- grossWeight: 0,
- selfLoading: 0,
- tare: 0,
- tips: '',
- // contractNo:'',
- // inOutTaskNo:'',
- buckleMiscellaneous: 0,
- netWeight: 0,
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- }
- this.getList()
- })
- // addstorageputList(weighingList1)
- // .toPromise()
- // .then((response) => {
- // this.weighingList.grossWeight =
- // this.weighingList.grossWeight * 1000
- // this.weighingList.tare = this.weighingList.tare * 1000
- // this.weighingList.netWeight =
- // this.weighingList.netWeight * 1000
- // this.weighingList.buckleMiscellaneous =
- // this.weighingList.buckleMiscellaneous * 1000
- // this.weighingList.warehouseInOutId = response
- // grossWeight(this.weighingList)
- // .toPromise()
- // .then((response) => {
- // getweighing({
- // id: response
- // })
- // .toPromise()
- // .then((response) => {
- // this.weighingList = response
- // this.inspect = JSON.parse(
- // JSON.stringify(this.weighingList)
- // )
- // this.isShowPrint = true
- // })
- // if (this.reader) {
- // this.reader.cancel()
- // }
- // // this.$notify.success({
- // // title: '成功',
- // // message: '提交成功',
- // // })
- // this.$notify({
- // title: '成功',
- // message: '提交成功',
- // type: 'success',
- // })
- // this.inspect = JSON.parse(JSON.stringify(this.weighingList))
- // this.isShowPrint = true
- // this.weighingList = {
- // grossWeight: 0,
- // selfLoading: 0,
- // tare: 0,
- // tips: '',
- // // contractNo:'',
- // // inOutTaskNo:'',
- // buckleMiscellaneous: 0,
- // netWeight: 0,
- // receivableWeighingFee: '',
- // warehouseInOutDetail: {
- // grade: '',
- // imperfectGrain: '',
- // impurity: '',
- // jiaorenli: '',
- // bulkDensity: '',
- // mildewGrain: '',
- // },
- // qualityInspectionManagement: {
- // boxNo: '暂无',
- // boxNoOther: '暂无',
- // titleNo: '暂无',
- // titleNoOther: '暂无',
- // },
- // }
- // this.getList()
- // })
- // })
- // .catch((response) => {})
- }
- })
- .catch(() => {
- return false
- })
- },
- carNoTypeChange() {
- this.carjudge = !this.carjudge
- if (this.carjudge) {
- this.weighingList.selfLoading = '1'
- this.carChange1 = '识别下拉'
- } else {
- this.weighingList.selfLoading = '0'
- this.carChange1 = '手动填写'
- }
- },
- tabClick(val) {
- this.weighingList = {
- grossWeight: '',
- tare: '',
- tips: '',
- buckleMiscellaneous: 0,
- netWeight: 0,
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- }
- this.index = val
- // this.disabled=true
- if (val == 0) {
- this.statusType = '3'
- this.information = '皮重'
- this.tpyeNo = '1'
- this.recheck1 = false
- } else {
- this.statusType = 3
- this.tpyeNo = '2'
- this.information = '毛重'
- this.recheck1 = true
- }
- this.getList()
- },
- warehouseNameChange(e) {
- for (let i = 0; i < this.warehouseList.length; i++) {
- if (this.warehouseList[i].value == e) {
- this.warehouseId = this.warehouseList[i].warehouseId
- // this.warehouseCount = this.warehouseList[i].ouCount
- }
- }
- for (let i = 0; i < this.warehouseList1.length; i++) {
- if (this.warehouseList1[i].warehouseName == e) {
- localStorage.setItem(
- 'houseSelfCollect_house1',
- JSON.stringify({
- No: this.warehouseList1[i].commonWarehouseNo,
- allowEdit: this.warehouseList1[i].allowEdit,
- value: this.warehouseList1[i].warehouseName,
- count: this.warehouseList1[i].count,
- warehouseId: this.warehouseList1[i].id,
- })
- )
- if (this.warehouseList1[i].allowEdit == 1) {
- this.disabled = false
- } else {
- this.disabled = true
- }
- this.positionInfos = this.warehouseList1[i].positionInfos
- this.warehouseCount = this.warehouseList1[i].outCount
- this.warehouseNo = this.warehouseList1[i].commonWarehouseNo
- this.warehouseType = this.warehouseList1[i].warehouseType
- }
- }
- this.getList()
- this.weighingList = {
- grossWeight: 0,
- selfLoading: 0,
- tare: 0,
- tips: '',
- // contractNo:'',
- // inOutTaskNo:'',
- buckleMiscellaneous: 0,
- netWeight: 0,
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- }
- },
- // async openPort() {
- // console.log('openPort', navigator)
- // if ('serial' in navigator) {
- // // if (!this.$store.state.app.reader) {
- // // The Web Serial API is supported.
- // console.log('the Web Serial API is supported.')
- // console.log(this.param)
- // const port = await navigator.serial.requestPort()
- // await port.open({
- // baudRate: this.param,
- // }) // set baud rate
- // this.reader = port.readable.getReader()
- // console.log('beforeReader', port)
- // console.log('beforeReader', this.reader)
- // this.$store.dispatch('app/setReader', this.reader)
- // // } else {
- // // console.log('afterport', this.$store.state.app.reader)
- // // this.reader = this.$store.state.app.reader
- // // }
- // // 监听来自串行设备的数据
- // while (true) {
- // const {
- // value,
- // done
- // } = await this.reader.read()
- // // console.log("value",value);
- // if (done) {
- // // 允许稍后关闭串口。
- // this.reader.releaseLock()
- // break
- // }
- // var result = ''
- // //2。获取16进制字符串
- // // var receData = HexConvert.ByteToString(value);
- // // console.log("receData",receData);
- // var flag = false
- // // for(var i=0;i<value.length;i++){
- // // var tmp = String.fromCharCode(value[i])
- // // if(tmp == '+'){
- // // flag = true
- // // }
- // // if(flag && result.length <6 && tmp != '+'){
- // // result += tmp
- // // }
- // // }
- // // if(this.tpyeNo != 2){
- // // this.weighingList.grossWeight = parseInt(result)
- // // }
- // // else{
- // // this.weighingList.tare = parseInt(result)
- // // }
- // if (
- // (this.warehouseName &&
- // (this.warehouseName == '山东诸城迈饶库' ||
- // this.warehouseName == '克东千红库')) ||
- // this.warehouseName == '鲅鱼圈祥腾库' ||
- // this.warehouseName == '哈尔滨依兰库' ||
- // this.warehouseName == '龙江金信库'
- // ) {
- // for (var i = 0; i < value.length; i++) {
- // var tmp = String.fromCharCode(value[i])
- // if (tmp == '+') {
- // flag = true
- // }
- // if (flag && result.length < 6 && tmp != '+') {
- // result += tmp
- // }
- // }
- // if (this.tpyeNo != 2) {
- // if (parseInt(result) || parseInt(result) == 0) {
- // this.weighingList.weight = parseInt(result)
- // }
- // } else {
- // if (parseInt(result) || parseInt(result) == 0) {
- // this.weighingList.weight = parseInt(result)
- // }
- // }
- // } else if (
- // this.warehouseName &&
- // (this.warehouseName == '顺诚粮库' ||
- // this.warehouseName == '鲅鱼圈金信库')
- // ) {
- // for (var i = value.length - 1; i >= 0; i--) {
- // var tmp = String.fromCharCode(value[i])
- // console.log(tmp)
- // if (String.fromCharCode(value[0]) == '.') {
- // flag = true
- // }
- // if (flag && result.length < 9 && tmp != '=' && tmp != '.') {
- // result += tmp
- // }
- // }
- // if (this.tpyeNo != 2) {
- // if (parseInt(result) || parseInt(result) == 0) {
- // this.weighingList.weight = parseInt(result)
- // }
- // } else {
- // if (parseInt(result) || parseInt(result) == 0) {
- // this.weighingList.weight = parseInt(result)
- // }
- // }
- // } else {
- // for (var i = 0; i < value.length; i++) {
- // var tmp = String.fromCharCode(value[i])
- // if (value[0] != 49 && value[0] != 2) {
- // break
- // }
- // if (tmp == String.fromCharCode(32)) {
- // flag = true
- // }
- // if (flag && result.length < 7 && tmp != String.fromCharCode(32)) {
- // // if(i-1 >=0 &&tmp == String.fromCharCode(48) && value[i-1] == 32){
- // // continue
- // // }
- // // if(i-2 >=0 &&tmp == String.fromCharCode(48) && value[i-2] == 32){
- // // continue
- // // }
- // result += tmp
- // }
- // }
- // if (this.tpyeNo != 2) {
- // if (parseInt(result) || parseInt(result) == 0) {
- // this.weighingList.weight = parseInt(result) * 100
- // }
- // } else {
- // if (parseInt(result) || parseInt(result) == 0) {
- // this.weighingList.weight = parseInt(result) * 100
- // }
- // }
- // }
- // // setTimeout(1000)
- // // value 是一个 Uint8Array
- // }
- // await port.close()
- // } else {
- // console.log('the Web Serial API is not supported.', navigator)
- // }
- // },
- find() {
- this.getList()
- },
- calculation() {
- if (this.weighingList.grossWeight && this.weighingList.tare) {
- let count = 0
- this.weighingList.netWeight =
- this.weighingList.grossWeight -
- this.weighingList.tare -
- Number(
- this.weighingList.buckleMiscellaneous ?
- this.weighingList.buckleMiscellaneous :
- 0
- )
- }
- },
- carChange(e) {
- for (let i = 0; i < this.tranCarInfoList.length; i++) {
- if (this.tranCarInfoList[i].carNo == this.weighingList.carNo) {
- this.weighingList.carNumber = this.tranCarInfoList[i].carNo
- this.weighingList.tranCarNo = this.tranCarInfoList[i].tranCarNo
- this.weighingList.carId = this.tranCarInfoList[i].id
- }
- }
- },
-
- // 获取当前年月日
- getTime() {
- var date = new Date()
- var mouth = date.getMonth() + 1
- var day = date.getDate()
- if (mouth < 10) {
- mouth = '0' + mouth
- }
- if (day < 10) {
- day = '0' + day
- }
- return date.getFullYear() + mouth + day
- },
- contractNoChange(e) {
- this.weighingList={
- grossWeight: '',
- tare: '',
- buckleMiscellaneous: 0,
- netWeight: 0,
- weight: '',
- tips: '',
- carNo:'',
- // contractNo:'',
- // inOutTaskNo:'',
- receivableWeighingFee: '',
- warehouseInOutDetail: {
- grade: '',
- imperfectGrain: '',
- impurity: '',
- jiaorenli: '',
- bulkDensity: '',
- mildewGrain: '',
- },
- qualityInspectionManagement: {
- boxNo: '暂无',
- boxNoOther: '暂无',
- titleNo: '暂无',
- titleNoOther: '暂无',
- },
- inOutDate: ''
- }
- this.weighingList.inOutTaskNo=e
- this.warehouseCount = this.warehouseCount1
- var data = null
- for (let i = 0; i < this.taskNolist.length; i++) {
- if (this.taskNolist[i].inOutTaskNo == e) {
- // this.weighingList.number = this.taskNolist[i].inOutTaskNo
- // this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
- this.weighingList.numberLetter = 'XSCK'
- this.weighingList.goodsName = this.taskNolist[i].goodsName
- this.weighingList.tips = this.taskNolist[i].businessDescribe
- data = this.taskNolist[i]
- if(this.taskNolist[i].inOutType=='移库出库'){
- this.weighingList.contractNo = this.taskNolist[i].moveTaskNo
-
- if(this.warehouseType == '1'){
- this.recheckPrice = true
- }else{
- this.recheckPrice = false
- }
-
- }else{
- if (this.taskNolist[i].contractNo) {
- // console.log(this.taskNolist[i])
- this.weighingList.contractNo = this.taskNolist[i].contractNo
- } else {
- this.weighingList.contractNo = this.taskNolist[i].moveTaskNo
- }
- this.recheckPrice = false
- }
-
- }
- }
- // if (!data) return
- for (var i = 0; i < this.outContractNo.length; i++) {
- if (this.outContractNo[i].contractNo == this.weighingList.contractNo) {
- this.weighingList.goodsName = this.outContractNo[i].goodsName
- if (this.weighingList.goodsName == '玉米(潮粮)') {
- this.weighingList.type = '潮粮'
- } else {
- this.weighingList.type = '干粮'
- }
- console.log(this.outContractNo[i],12222)
- // this.weighingList.contractPrice = this.outContractNo[i].unitContractPrice
- this.$set(this.weighingList,'contractPrice',this.outContractNo[i].unitContractPrice)
- this.$set(this.weighingList,'customer',this.outContractNo[i].buyer)
- this.weighingList.goodsNameKey = this.outContractNo[i].goodsNameKey
- this.weighingList.grade = this.outContractNo[i].grade
- this.weighingList.inOutType = this.outContractNo[i].inOutType
- if (this.outContractNo[i].inOutType == '销售出库') {
- this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
- this.weighingList.numberLetter = 'XSCK'
- this.weighingList.buyer = this.outContractNo[i].buyer
- this.weighingList.seller = localStorage.getItem('ws-pf_compName')
- if (!this.outContractNo[i].unitContractPrice) {
- this.weighingList.tips = '买方' + this.outContractNo[i].buyer
- } else {
- this.weighingList.tips =
- '买方' +
- this.outContractNo[i].buyer +
- '( ' +
- this.outContractNo[i].unitContractPrice +
- '元/吨)'
- }
- this.weighingList.inOutTypeKey = 1
- } else if (this.outContractNo[i].inOutType == '移库出库') {
- this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
- this.weighingList.numberLetter = 'YKCK'
- this.weighingList.buyer = this.outContractNo[i].receiveWarehouse
- this.weighingList.seller = this.outContractNo[i].sendWarehouse
- this.weighingList.goodsName = data == null?'玉米':data.goodsName
- this.weighingList.goodsNameKey = data == null?'1':data.goodsNameKey
- this.weighingList.grade = data == null?'二等品':data.grade
- if (this.outContractNo[i].unitContractPrice) {
- this.weighingList.tips =
- '入货库' +
- data == null?'':data.receiveWarehouse +
- '( ' +
- this.outContractNo[i].unitContractPrice +
- '元/吨)'
- } else {
- this.weighingList.tips = '入货库' + data == null?'':data.receiveWarehouse
- }
- this.weighingList.inOutTypeKey = 3
- } else if (this.outContractNo[i].inOutType == '暂存入库') {
- this.weighingList.inOutTypeKey = 4
- } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
- this.weighingList.inOutTypeKey = 5
- } else if (this.outContractNo[i].inOutType == '采购出库') {
- this.weighingList.inOutTypeKey = 6
- }
- if (this.outContractNo[i].deliverType == '1') {
- this.carstatus = true
- } else {
- this.carstatus = false
- }
- if (this.outContractNo[i].tranCarInfoList) {
- this.options2 = this.outContractNo[i].tranCarInfoList
- this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
- this.carstatus = true
- }
- if (this.outContractNo[i].tranCarInfoList1) {
- this.fleetNameList = this.outContractNo[i].tranCarInfoList1
- }
- }
- }
- },
- selectWarehouse() {
- selectWarehouseSelf({
- compId: localStorage.getItem('ws-pf_compId'),
- })
- .toPromise()
- .then((response) => {
- this.warehouseList = []
- for (let i = 0; i < response.length; i++) {
- this.warehouseList.push({
- value: response[i].warehouseName,
- warehouseId: response[i].id,
- })
- }
- let _wareHouse = localStorage.getItem('houseSelfCollect_house1')
- _wareHouse = JSON.parse(_wareHouse)
- for (let i = 0; i < response.length; i++) {
- if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
- this.warehouseName = response[i].warehouseName
- this.warehouseId = response[i].id
- this.positionInfos = response[i].positionInfos
- this.warehouseCount = response[i].outCount
- this.warehouseCount1 = response[i].outCount
- this.warehouseNo = response[i].commonWarehouseNo
- this.warehouseType = response[i].warehouseType
- if (response[i].allowEdit == 1) {
- this.disabled = false
- } else {
- this.disabled = true
- }
- }
- if (!_wareHouse) {
- this.warehouseName = this.warehouseList[0].value
- this.warehouseId = this.warehouseList[0].warehouseId
- this.positionInfos = response[0].positionInfos
- this.warehouseCount = response[0].outCount
- this.warehouseCount1 = response[0].outCount
- this.warehouseNo = response[0].commonWarehouseNo
- this.warehouseType = response[0].warehouseType
- if (response[0].allowEdit == 1) {
- this.disabled = false
- } else {
- this.disabled = true
- }
- console.log()
- }
- }
- this.warehouseList1 = response
- this.deptBudgetList.warehouseName = this.warehouseName
- this.getList()
- })
- },
- getList() {
- pullDown({
- constId: 'CON6',
- })
- .toPromise()
- .then((response) => {
- this.storageType = response
- })
- getReceiptTaskNo({
- flag: 1,
- warehouseName: this.warehouseName,
- agentKey: localStorage.getItem('ws-pf_userId'),
- })
- .toPromise()
- .then((response) => {
- this.taskNolist = response
- })
- //合同编号
- xialaNo({
- compId: localStorage.getItem('ws-pf_compId'),
- flag: 5,
- })
- .toPromise()
- .then((response) => {
- this.outContractNo = response
- })
- // this.refreshClick(1)
- getweighingList({
- compId: localStorage.getItem('ws-pf_compId'),
- currentPage: this.currentPage,
- pageSize: this.pageSize,
- searchKeyWord: this.searchKeyWord,
- warehouseName: this.warehouseName,
- managementType: 3,
- statusType: this.statusType,
- })
- .toPromise()
- .then((response) => {
- this.deliveryList = response.records
- this.deptBudgetTotal = response.total
- for (var i = 0; i < response.records.length; i++) {
- if (response.records[i].addressUrl != null) {
- if (response.records[i].addressUrl) {
- response.records[i].addressUrlArray =
- response.records[i].addressUrl.split(',')
- }
- } else {
- response.records[i].addressUrlArray = []
- }
- }
- for (var i = 0; i < response.records.length; i++) {
- var arr = new Array()
- this.addressUrls[i] = new Array()
- if (this.weighingList.records[i].addressUrl != null) {
- arr = this.weighingList.records[i].addressUrl.split(',')
- this.addressUrls[i] = arr
- }
- }
- })
- .catch((response) => {})
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- .center {
- background: #fff;
- }
- .size_css {
- width: 540px;
- min-width: 540px;
- overflow-x: scroll;
- position: relative;
- }
- .ws-info-table {
- border: none;
- }
- .base_header_layout {
- padding: 10px;
- margin-bottom: 10px;
- }
- .ws-info-table .el-form-item {
- width: 50%;
- border: none;
- }
- .formItem {
- width: 100%;
- display: inline;
- }
- .ws-info-table {
- border: none;
- }
- .ws-info-table .el-form-item {
- width: 100%;
- border: none;
- }
- /deep/.ws-info-table .el-form-item .el-form-item__label {
- width: 30%;
- text-align: center;
- background: #ffffff;
- color: #8890b1;
- }
- /deep/.ws-info-table .el-form-item .el-form-item__content {
- border: none;
- }
- /deep/.el-textarea__inner {
- width: 92%;
- }
- /deep/.ws-info-table .el-form-item.rememo .el-form-item__content {
- height: 76px;
- }
- .title {
- font-size: 16px;
- font-weight: 600;
- margin: 10px;
- }
- .titleup {
- position: relative;
- }
- .title::before {
- content: '';
- display: inline-block;
- width: 5px;
- height: 15px;
- background: #8890b1;
- margin-right: 5px;
- }
- .substance {
- background: #ffffff;
- width: 100%;
- border-radius: 4px;
- margin: 0 auto;
- padding-top: 20px;
- }
- /deep/.el-table .el-table__header .cell,
- .el-table .el-table__body .cell {
- text-align: center;
- }
- /deep/.el-table--enable-row-transition .el-table__body td {
- text-align: center;
- }
- .bg-left {
- padding-left: 30px;
- }
- .bg-right {
- padding-right: 10px;
- text-align: right;
- }
- .bg-bottom {
- margin: 15px 0px;
- }
- .titleup {
- position: relative;
- }
- /deep/ .substance .bangdan {
- width: 100%;
- padding-top: 6%;
- padding-bottom: 6%;
- }
- // // .photo2{
- // // margin-top: 10px;
- // // }
- .el-upload--picture-card {
- background-color: #fbfdff;
- border: 1px dashed #c0ccda;
- border-radius: 6px;
- box-sizing: border-box;
- width: 148px;
- height: 148px;
- line-height: 146px;
- vertical-align: top;
- margin-left: -289px;
- }
- // .titleup::before {
- // content: '';
- // display: inline-block;
- // width: 5px;
- // height: 30px;
- // background: #5473e8;
- // position: absolute;
- // left: 0;
- // }
- .but {
- text-align: center;
- margin: 20px auto;
- }
- .stocks {
- position: relative;
- /deep/.el-select>.el-input {
- display: inline-block;
- }
- /deep/>.el-input {
- width: 33.3333%;
- }
- .add,
- .del {
- position: absolute;
- right: -16px;
- transform: translateY(20%);
- }
- .del {
- right: -40px;
- }
- }
- .butCss {
- opacity: 0;
- color: #000;
- }
- .center {
- overflow-y: scroll;
- }
- .el-button--success.is-plain {
- border: 1px solid #2aff7c;
- background: black;
- color: #2aff7c;
- width: 50%;
- }
- .call-show {
- width: 540px;
- }
- .top {
- background: black;
- color: #2aff7c;
- font-size: 32px;
- text-align: right;
- padding: 0 10px 0 20px;
- border-radius: 10px;
- margin: 0 20px 20px 21px;
- position: absolute;
- top: 140px;
- width: 465px;
- .zujian {
- position: relative;
- }
- .kg-style {
- font-size: 30px;
- color: red;
- }
- .confirmInfo {
- display: flex;
- // line-height: 90px;
- .car-type {
- text-align: left;
- width: 50%;
- min-width: 200px;
- }
- .car-no {
- width: 50%;
- text-align: right;
- }
- }
- .confirmWeight {
- display: flex;
- align-items: center;
- .titleWeight {
- width: 35%;
- min-width: 200px;
- text-align: left;
- line-height: 90px;
- color: red;
- }
- .weight {
- width: 65%;
- text-align: right;
- color: red;
- }
- }
- }
- .bottom {
- // text-align: center;
- background: white;
- margin: 20px 20px 0 20px;
- // border-radius: 10px;
- padding-bottom: 20px;
- .img1,
- .img2 {
- width: 200px;
- padding: 20px;
- }
- .video-content {
- width: 100%;
- }
- .video1 {
- text-align: center;
- }
- }
- /deep/.title_css .el-dialog__header {
- text-align: center !important;
- }
- </style>
|