123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418 |
- <!--入库单-->
- <template>
- <div class="container">
- <BaseHeaderLayout :leftSpan="16">
- <template slot="left">
- <div style='width:50%;margin-right:10px;'>
- <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
- start-placeholder="开始日期" value-format='yyyy-MM-dd' end-placeholder="结束日期" @change='datechange'
- :picker-options="pickerOptions">
- </el-date-picker>
- </div>
- <div style='width:40%;margin-right:10px;'>
- <el-select v-model="warehouseName" filterable placeholder="" @change="warehouseNameChange" :value="searchType"
- style="margin: 0 10px">
- <el-option key="全部仓库" label="全部仓库" value="" style="color: #8890b1" />
- <el-option v-for="item in warehouseList" :key="'cangku' + item.warehouseName" :label="item.warehouseName"
- :value="item.warehouseName" style="color: #8890b1" />
- </el-select>
- </div>
- <div style='width:50%;margin-right:10px;display: flex;'>
- <el-select v-model="goodsName" filterable placeholder="" @change="goodsNameChange"
- style="margin: 0 10px">
- <el-option key="全部货名" label="全部货名" value="0" style="color: #8890b1" />
- <el-option v-for="(item,index) in goodsList" :key="item.id" :label="item.goodsName"
- :value="(index+1)" style="color: #8890b1" />
- </el-select>
- <span style="width:100px" v-if="warehouseName && goodsName">{{reserves?reserves:0}}吨</span>
- </div>
- <div style='width:50%;margin-right:10px;display: flex;'>
- <el-select v-model="weightGreater" filterable placeholder="" @change="weightGreaterChange"
- style="margin: 0 10px">
- <el-option key="全部重量" label="全部重量" value="" style="color: #8890b1" />
- <el-option key="剩余重量大于0" label="剩余重量大于0" value="1" style="color: #8890b1" />
- </el-select>
- </div>
- </template>
- <template slot="right">
- <ws-input @keyup.enter.native="find()" class='findValue' v-model="searchKeyWord" placeholder="可按货源查找" clearable
- maxlength="300" type="input"></ws-input>
- <ws-button class="find" type="primary" @click="lookUp()">
- <img width="16" height="16" style="
- vertical-align: text-top;
- position: relative;
- top: 0px;
- " src="../../../public/img/sousuo.png" alt />
- </ws-button>
- </template>
- </BaseHeaderLayout>
- <el-row style='margin:10px;'>
- <el-col :span="12">
- <ws-button :type="searchType === '' ? 'primary' : ''" @click="handle('')" v-hasPermission="
- `warehouseManagement.warehousingOrder.View`">全部
- </ws-button>
- <ws-button :type="searchType === '1' ? 'primary' : ''" @click="handle('1')" v-hasPermission="
- `warehouseManagement.warehousingOrder.View`">未付款
- </ws-button>
- <ws-button :type="searchType === '2' ? 'primary' : ''" @click="handle('2')" v-hasPermission="
- `warehouseManagement.warehousingOrder.View`">待审核
- </ws-button>
- </el-col>
- <el-col style='text-align:right;' :span="12">
- <!-- <ws-button v-hasPermission="
- `warehouseManagement.warehousingOrder.yufu`" type="primary" @click="interestrate()" >{{interestratevalue.value}}利率</ws-button> -->
- <ws-button type="primary" @click="exportList()">导出</ws-button>
- <ws-button v-hasPermission="
- `warehouseManagement.warehousingOrder.yufu`" type="primary" @click="fieldrations()">折干</ws-button>
- <ws-button v-hasPermission="
- `warehouseManagement.warehousingOrder.yufu`" type="primary" @click="distribution()">预付款分配</ws-button>
- <ws-button v-hasPermission="
- `warehouseManagement.warehousingOrder.bzj`" type="primary" @click="marginAllocation()">保证金分配</ws-button>
- <!-- <el-button type="primary" @click="warehousingorder()" v-hasPermission="
- `warehouseManagement.warehouse.warehouseInfoTask.add`
- ">出单
- </el-button> -->
- </el-col>
- </el-row>
- <div v-for="(item, index) in gainList" style='margin:10px;border:1px solid #ccc;padding:10px;'>
- <div style='width:100%;justify-content:space-between;align-items:center;margin-bottom:10px;' class="flex">
- <div>{{ item.issuingTime }} 合计{{ item.summation }}</div>
- <div>{{ item.warehouseName }}入库单<span v-if='item.warehouseType == 2'>(临)</span></div>
- <div>
- <!-- <ws-button type="primary" @click="distribution(item)" >预付款分配</ws-button>
- <ws-button type="primary" @click="marginAllocation(item)">保证金分配</ws-button> -->
- <ws-button v-if='item.payshow' type="primary" @click="payout(item)"
- v-hasPermission="`warehouseManagement.warehousingOrder.appl`">请款
- </ws-button>
- <ws-button v-if="item.approveStatus&& item.payshow" type="primary" @click="withdraw(item)"
- v-hasPermission="`warehouseManagement.warehousingOrder.appl`">撤回
- </ws-button>
- <ws-button v-if='!item.payshow' type="primary" @click="cancel(item)" v-hasPermission="
- `warehouseManagement.warehousingOrder.appl`
- ">取消
- </ws-button>
- <ws-button v-if='!item.payshow' type="primary" @click="submit(item)" v-hasPermission="
- `warehouseManagement.warehousingOrder.appl`
- ">提交
- </ws-button>
- <ws-button type="primary" @click="aduit(item)" v-hasPermission="
- `warehouseManagement.warehousingOrder.adiut`
- ">审核
- </ws-button>
- <ws-button type="primary" @click="payment(item)" v-hasPermission="
- `warehouseManagement.warehousingOrder.pay`
- ">付款
- </ws-button>
- </div>
- </div>
- <el-table show-summary :summary-method="getSummaries" class="wenzi" :ref="'multipleTable' + index"
- :data="item.warehousingOrderList" style="width: 100%"
- @selection-change="handleSelectionChange($event, item, index)">
- <el-table-column :selectable='selectInit' type="selection" width="55">
- </el-table-column>
- <el-table-column type="index" label="序号">
- <template scope="scope">
- <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
- <span v-else>{{ scope.$index + 1 }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="contractNo" label="合同编号" width="190">
- <template scope="scope">
- <span>
- {{ scope.row.contractNo }} ({{ scope.row.inType }})
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="buyer" label="买方" width="150"></el-table-column>
- <el-table-column prop="goodsSource" label="货源" width="130">
- <template scope="scope">
- <span style='color:#66b1ff;' @click='lookcustomer(scope.row)'>{{ scope.row.goodsSource }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="deliveryWarehouse" label="发货库" width="130"></el-table-column>
- <!-- <el-table-column prop="customer" label="客户" width="100">
- <template scope="scope">
- <span @click='lookcustomer(scope.row)'>{{scope.row.customer}}</span>
- </template>
- </el-table-column> -->
- <el-table-column prop="goodsName" label="货名" width="120">
- </el-table-column>
- <el-table-column prop="inWarehouseWeight1" width="130" class="table_td" label="加权水分">
- <template scope="scope">
- <span v-if='scope.row.edit == false'>{{ scope.row.weightedMoisture }}</span>
- <el-input style='width:80%;' v-if='scope.row.edit' v-model='scope.row.weightedMoisture'></el-input>
- <i @click="changeMoisture(scope.row)" v-if="
- scope.row.edit" class="iconfont icon-dui"></i>
- <img v-if="!scope.row.edit" width="17" height="18"
- style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
- @click="editMoisture(scope.row)" alt="" />
- </template>
- </el-table-column>
- <el-table-column prop="inWarehouseWeight1" width="150" class="table_td" label="入库重量">
- <template scope="scope">
- <span
- v-if='scope.row.weightedit == false && scope.row.warehouseType == 2 || scope.row.warehouseType == 1'>{{ scope.row.inWarehouseWeight1 }}</span>
- <el-input style='width:80%;' v-if='scope.row.weightedit && scope.row.warehouseType == 2'
- v-model='scope.row.inWarehouseWeight1'></el-input>
- <i @click="changeWeight(scope.row)" v-if="
- scope.row.weightedit && scope.row.warehouseType == 2" class="iconfont icon-dui"></i>
- <img v-if="!scope.row.weightedit && scope.row.warehouseType == 2" width="17" height="18"
- style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
- @click="editWeight(scope.row)" alt="" />
- </template>
- </el-table-column>
- <el-table-column prop="outWarehouseWeight" width="80" class="table_td" label="出库重量"></el-table-column>
- <el-table-column prop="profitAndLoss" class="table_td" label="盈亏(吨)"></el-table-column>
- <el-table-column prop="surplusWeight" width="80" class="table_td" label="剩余重量"></el-table-column>
- <el-table-column prop="grainFund" width="80" class="table_td" label="粮款(元)"></el-table-column>
- <el-table-column prop="amountEdPayable" width="110" class="table_td" label="已付(元)">
- <template scope="scope">
- <span>{{ scope.row.amountEdPayable }}</span>
- <img v-if='scope.row.addressUrl' width="18" height="20"
- style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/fujian.png"
- @click="fujian(scope.row)" alt="" />
- </template>
- </el-table-column>
- <el-table-column prop="amountNotPayable" width="80" class="table_td" label="未付(元)"></el-table-column>
- <el-table-column prop="amountMoney" width="80" class="table_td" label="费用(元)">
- <template scope="scope">
- <span style='color:#66b1ff;' @click='costclick(scope.row)'>{{ scope.row.amountMoney }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="avgCost" width="90" class="table_td" label="平均成本"></el-table-column>
- <el-table-column prop="requestFunds" width="150" class="table_td tablerequestFunds" label="请款">
- <template scope="scope">
- <span v-if="!scope.row.select">{{ scope.row.requestFunds }}</span>
- <el-input @focus="qingkuan(scope.row, item.id)" v-else v-model='scope.row.requestFunds'></el-input>
- </template>
- </el-table-column>
- <el-table-column prop="remark" width="150" class="table_td" label="请款备注">
- <template scope="scope">
- <div v-if="!scope.row.select" @click.stop="lookRemark(scope.row)">
- <span class="text_css">查看</span>
- </div>
- <el-input @focus="inputremark(scope.row, item.id)" v-else v-model='scope.row.remark'></el-input>
- </template>
- </el-table-column>
- <el-table-column prop="approveStatus" label="请款状态" width="90">
- <template slot-scope="scope">
- <span v-if='scope.row.approveStatus'>{{ scope.row.approveStatus }}</span>
- <span v-else>{{ scope.row.status }}</span>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
- style="text-align: center" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
- :total="deptBudgetTotal">
- </el-pagination>
- <el-dialog title="付款" :visible.sync="aduitshow" width="50%" :before-close="handleClose">
- <div style='display:flex;'>
- <div style='width:50%;'>
- <el-form ref="form" :model="form" label-width="120px">
- <el-form-item label="合计金额">
- <el-input disabled v-model="form.name"></el-input>
- </el-form-item>
- <el-form-item label="附件">
- <!-- <el-upload ref='uploadfiles' :file-list='dataList' :action="global.uploadPath" list-type="picture-card"
- :on-success="handlefujian" :on-remove="handleRemove" class="photo2" accept="image/jpg,image/jpeg,image/png">
- <i class="el-icon-plus"></i>
- </el-upload> -->
- <ws-upload ref="upload" :size-limit="size" @onChange="onChange" :comp-id="compId"
- accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .zip, .rar" />
- </el-form-item>
- </el-form>
- </div>
- <div style='width:50%;height:220px;overflow-y:scroll;'>
- <div v-for="(item, index) in payeeinfo">
- <div style='margin:0 0 10px;width:90%;'>账户信息-{{ index + 1 }}</div>
- <el-form label-position="left">
- <el-form-item label-width='100px' label="收款方" span="1" prop="purpose" class="readonly">
- {{ item.customerName }}
- </el-form-item>
- <el-form-item label-width='100px' label="账号" span="1" prop="purpose" class="readonly">
- {{ item.bankCard }}
- </el-form-item>
- <el-form-item label-width='100px' label="开户行" span="1" prop="purpose" class="readonly">
- {{ item.bankDeposit }}
- </el-form-item>
- <el-form-item label-width='100px' label="开户支行" span="1" prop="purpose" class="readonly">
- {{ item.bankDepositBranch }}
- </el-form-item>
- </el-form>
- </div>
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="aduitshow = false">取消</el-button>
- <el-button type="primary" @click="paymentsubmit">确定</el-button>
- </span>
- </el-dialog>
- <el-dialog title="客户信息" :visible.sync="customershow" width="50%" :before-close="handleClose3">
- <div>
- <el-form label-position="left">
- <el-form-item label-width='100px' label="收款方" span="1" prop="purpose" class="readonly">
- {{ customerInfo.customerName }}
- </el-form-item>
- <el-form-item label-width='100px' label="账号" span="1" prop="purpose" class="readonly">
- {{ customerInfo.bankCard }}
- </el-form-item>
- <el-form-item label-width='100px' label="开户行" span="1" prop="purpose" class="readonly">
- {{ customerInfo.bankDeposit }}
- </el-form-item>
- <el-form-item label-width='100px' label="开户支行" span="1" prop="purpose" class="readonly">
- {{ customerInfo.bankDepositBranch }}
- </el-form-item>
- </el-form>
- </div>
- </el-dialog>
- <el-dialog title="预付款分配" :visible.sync="distributionshow" width="50%" :before-close="handleClose1">
- <div>
- <!--插槽会替换title显示的内容 -->
- <div slot="title" class="header-title">
- <span v-show="dialogTitle" class="title-name">{{ dialogTitle }}</span>
- </div>
- <el-form ref="form" :model="form" label-width="120px">
- <el-col class="col1">
- <el-form-item label="累计预付(元)">
- <el-input disabled v-model="form.accumulatedPrepayment"></el-input>
- </el-form-item>
- </el-col>
- <el-col class="col1">
- <el-form-item label="收回预付(元)">
- <el-input disabled v-model="form.recoveryPrepayments"></el-input>
- </el-form-item>
- </el-col>
- <el-col class="col1">
- <el-form-item label="已分配(元)">
- <el-input disabled v-model="form.distributionEd"></el-input>
- </el-form-item>
- </el-col>
- <el-col class="col1">
- <el-form-item label="可分配(元)">
- <el-input disabled v-model="form.distributionCan"></el-input>
- </el-form-item>
- </el-col>
- <el-row>
- <el-col class="col1">
- <el-form-item label="未付金额(元)">
- <el-input disabled v-model="form.distributionNot"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-form-item label="分配金额(元)">
- <el-input v-model="form.distributionIng"></el-input>
- </el-form-item>
- </el-row>
- </el-form>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="handleClose1">取消</el-button>
- <el-button type="primary" @click="distributionsubmit">提交</el-button>
- </span>
- </el-dialog>
- <el-dialog title="保证金分配" :visible.sync="marginshow" width="50%" :before-close="handleClose2">
- <div>
- <!--插槽会替换title显示的内容 -->
- <div slot="title" class="header-title">
- <span v-show="dialogTitle" class="title-name">{{ dialogTitle }}</span>
- </div>
- <el-form ref="form" :model="form" label-width="120px">
- <el-col class="col1">
- <el-form-item label="累计支付(元)">
- <el-input disabled v-model="form.accumulatedPrepayment"></el-input>
- </el-form-item>
- </el-col>
- <el-col class="col1">
- <el-form-item label="累计收回(元)">
- <el-input disabled v-model="form.recoveryPrepayments"></el-input>
- </el-form-item>
- </el-col>
- <el-col class="col1">
- <el-form-item label="已分配(元)">
- <el-input disabled v-model="form.distributionEd"></el-input>
- </el-form-item>
- </el-col>
- <el-col class="col1">
- <el-form-item label="可分配(元)">
- <el-input disabled v-model="form.distributionCan"></el-input>
- </el-form-item>
- </el-col>
- <el-row>
- <el-col class="col1">
- <el-form-item label="未付金额(元)">
- <el-input disabled v-model="form.distributionNot"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-form-item label="分配金额(元)">
- <el-input v-model="form.distributionIng"></el-input>
- </el-form-item>
- </el-row>
- </el-form>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="handleClose2">取消</el-button>
- <el-button type="primary" @click="marginsubmit">提交</el-button>
- </span>
- </el-dialog>
- <el-dialog title="折干" :visible.sync="fieldrationsshow" width="50%" :before-close="handleClose4">
- <div>
- <!--插槽会替换title显示的内容 -->
- <div slot="title" class="header-title">
- <span v-show="dialogTitle" class="title-name">{{ dialogTitle }}</span>
- </div>
- <el-form ref="form" :model="form" label-width="140px">
- <el-form-item label="折干前重量(吨)">
- <el-input v-model="fieldrationsList.beforeWeight" disabled></el-input>
- </el-form-item>
- <!-- <el-form-item label="折干前成本(元/吨)">
- <el-input disabled placeholder="自动计算,不可编辑" v-model="fieldrationsList.beforeCost"></el-input>
- </el-form-item>-->
- <el-form-item label="折干前仓位">
- <el-select @focus="warehousefocus" @change="warehousechange" v-model="fieldrationsList.beforeBinNo"
- filterable placeholder="请选择">
- <el-option v-for="item in options" :key="item.id" :label="item.binNumber" :value="item.binNumber">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="折干后重量(吨)">
- <el-input v-model="fieldrationsList.afterWeight"></el-input>
- </el-form-item>
- <!-- <el-form-item label="折干后成本(元/吨)">
- <el-input disabled placeholder="自动计算,不可编辑" v-model="fieldrationsList.afterCost"></el-input>
- </el-form-item> -->
- <el-form-item label="折干后仓位">
- <el-select @focus="warehousefocus1" @change="warehousechange1" v-model="fieldrationsList.afterBinNo"
- filterable placeholder="请选择">
- <el-option v-for="item in options1" :key="item.id" :label="item.binNumber" :value="item.binNumber">
- </el-option>
- </el-select>
- </el-form-item>
- </el-form>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="handleClose4">取消</el-button>
- <el-button type="primary" @click="fieldrationssubmit">提交</el-button>
- </span>
- </el-dialog>
- <el-dialog :title="'输入' + titletype" :visible.sync="dialogVisiblecontent" width="30%" @close="handleClose5"
- :close-on-click-modal="false">
- <div>
- <el-input type="textarea" :rows="5" maxlength="500" placeholder="请输入内容" v-model="textarea">
- </el-input>
- <div style="text-align:center;margin-top:10px;">
- <ws-button type="primary" @click="handlequeren()" v-hasPermission="
- `warehouseManagement.warehouse.warehouseInfoTask.add`
- ">确认
- </ws-button>
- </div>
- </div>
- </el-dialog>
- <div class="mask" v-show="isShowPrintType"></div>
- <div class="print-type" v-show="isShowPrintType">
- <div class="print-type-content">
- <div class="print-type-title">{{headerText}}</div>
- <div class="print-type-checkbox">
- <el-form ref="form" label-width="110px">
- <el-form-item label="起始日期">
- <el-date-picker type="datetime" @change="startDataChange" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择起始日期" v-model="parameter.exportStartDate" default-time="00:00:00"></el-date-picker>
- </el-form-item>
- <el-form-item label="截止日期">
- <el-date-picker type="datetime" @change="endDataChange" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择截止日期" v-model="parameter.exportEndDate" default-time="00:00:00">
- </el-date-picker>
- </el-form-item>
- <!--仓库名称-->
- <el-form-item label="仓库名称" span="1" prop="warehouseName" >
- <el-select v-model="parameter.warehouseName" placeholder="请选择仓库名称" filterable clearable>
- <el-option key="" label="全部仓库" value="全部仓库" />
- <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName" />
- </el-select>
- </el-form-item>
- </el-form>
- </div>
- </div>
- <div class="bottom-btn">
- <el-button @click="submitClick()">确定</el-button>
- <el-button @click="removePrint">取消</el-button>
- </div>
- </div>
- <!-- <el-dialog
- title="提示"
- :visible.sync="dialogVisible"
- width="30%"
- :before-close="handleClose">
- <div>
- <el-time-picker
- v-model="value1"
- format='HH:mm'
- value-format="HH:mm"
-
- placeholder="任意时间点"> </el-time-picker>
- <ws-button type="primary" @click="handleAdd()" v-hasPermission="
- `warehouseManagement.warehouse.warehouseInfoTask.add`
- ">修改
- </ws-button>
- </div>
- </el-dialog> -->
- <el-dialog width='30%' :visible.sync="remarkList" title="备注" top="20vh">
- <span>{{ remark }}</span>
- </el-dialog>
- <el-dialog width='50%' :visible.sync="interestrateshow" title="修改利率" top="20vh">
- <el-input placeholder="" v-model="interestratevalue.value"></el-input>
- <span slot="footer" class="dialog-footer">
- <el-button type="primary" @click="interestratesubmit">保存</el-button>
- </span>
- </el-dialog>
- <el-dialog width='50%' :visible.sync="accessoryTFs" title="附件" top="20vh">
- <div v-if="appendixIdss.length > 0 && appendixIdss[0].indexOf('http') != -1">
- <div v-for="(item, index) in appendixIdss" :key="'fujian' + index">
- <el-image style="width: 100px; height: 100px" :src="item" :preview-src-list="appendixIdss">
- </el-image>
- </div>
- </div>
- <ws-upload v-if="appendixIdss.length > 0 && appendixIdss[0].indexOf('http') == -1" ref="upload" :comp-id="compId"
- :appendix-ids="appendixIdss" :editable="false" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
- </el-dialog>
- <el-dialog width='30%' :visible.sync="dialogVisible1" title="费用" top="20vh">
- <div style="justify-content:space-between;" class="flex">
- <div>累计利息</div>
- <div>{{interest}}</div>
- </div>
- <div style="justify-content:space-between;" class="flex">
- <div>累计仓储费</div>
- <div>{{storageFee}}</div>
- </div>
- <div style="justify-content:space-between;" class="flex">
- <div>烘干费</div>
- <div>{{dryingFee?dryingFee:0}}</div>
- </div>
- <div v-for="(item, index) in costlist" :key="index" class="audit">
- <div class="audit_item">
- <div class="audit_left">
- <span class="audit_name">{{ item.costNo }}</span>
- </div>
- <div class='audit_date'><span>{{ item.createDate }}</span></div>
- </div>
- <div class="audit_item">
- <div class="audit_left">
- <span class="audit_name">{{ item.expenseName }}</span>
- </div>
- <div class='audit_date'><span>{{ item.distributionMoney }}</span></div>
- </div>
- </div>
- </el-dialog>
- <el-dialog
- :title="title1"
- :visible.sync="rejectshow"
- width="30%"
- @close="handleClose6">
- <span>{{title1=='驳回'?'驳回审核':'通过审核'}}</span>
- <div>
- <el-input
- type="textarea"
- :rows="2"
- placeholder="请输入审核意见"
- v-model="auditMind">
- </el-input>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="rejectshow = false">取 消</el-button>
- <el-button type="primary" @click="rejectclick">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- getoreditoutput,
- outdelete,
- movestates,
- // woekflowhandle
- } from '@/model/tasksport/index'
- import {
- getwarehousingorder,
- paymoney,
- editwarehousingorder,
- getExpense,
- workflowhandle,
- getposition,
- dryout,
- xiala,
- getenabledinfo,
- setenabledinfo,
- getbyname,
- sponsorWithdraw,
- exportOrder,
- getdryweight
- } from '@/model/warehouse/index'
- import {
- selectWarehouseSelf,
- } from '@/model/houseSelfCollect/index'
- import { getpayeeinfo, getbuypayeeinfo } from '@/model/profitable/index'
- import {
- downloadFile
- } from '@/utils/batchDown'
- import Pagination from '@/components/Pagination'
- import WsUpload from '@/components/WsUpload'
- import {
- dayjs,
- fmoney,
- EventBus
- } from 'base-core-lib'
- import { findLastIndexOfIterate } from 'xe-utils/methods'
- export default {
- name: 'viewSpareMoney',
- components: {
- WsUpload,
- Pagination,
- },
- watch: {
- vesselId(val) {
- this.getList()
- },
- isShow(val) {
- this.showType = val
- },
- },
- data() {
- return {
- currectdata: {},
- //弹出框
- dialogViewSpareMoney: false,
- dialogApproveFormVisible: false,
- interestrateshow: false,
- dataList: [],
- payeeinfo: [],
- title1:'',
- StartDate:'',
- EndDate:'',
- rejectshow:false,
- options: [],
- isShowPrintType: false,
- // warehouseAllXiaLa:[],
- textarea: '',
- weightGreater:'',
- warehouseList:[],
- // warehouseXiaLaCopy:[],
- headerText: '入库单导出',
- dialogVisiblecontent: false,
- // 船舶类型
- monetaryKey: null,
- form: {
- accumulatedPrepayment: '',
- recoveryPrepayments: '',
- distributionEd: '',
- distributionCan: '',
- distributionNot: '',
- distributionIng: ''
- },
- // 表格显示数据
- tableDate: [],
- fieldrationsList: {
- beforeWeight: '',
- beforeCost: '',
- afterWeight: '',
- afterCost: '',
- },
- // 是否显示
- showType: true,
- dialogVisible: false,
- // 年
- year: '',
- title: '',
- disabled: false,
- gainList: [],
- currentPage: 1,
- primary: '1',
- dialogVisible1: false,
- pickerOptions: {
- shortcuts: [{
- text: '本周',
- onClick(picker) {
- const end = new Date()
- const start = new Date()
- var thisDay = start.getDay()
- var thisDate = start.getDate()
- if (thisDay != 0) {
- start.setDate(thisDate - thisDay)
- }
- picker.$emit('pick', [start, end])
- },
- },
- {
- text: '本月',
- onClick(picker) {
- const end = new Date()
- const start = new Date()
- start.setDate(1)
- picker.$emit('pick', [start, end])
- },
- },
- {
- text: '本季度',
- onClick(picker) {
- var oDate = new Date()
- var thisYear = oDate.getFullYear()
- var thisMonth = oDate.getMonth() + 1
- var n = Math.ceil(thisMonth / 3) // 季度
- var Month = n * 3 - 1
- var start = new Date(thisYear, Month - 2, 1)
- var end = new Date()
- picker.$emit('pick', [start, end])
- },
- },
- ],
- },
- value1: '',
- value: '',
- value2: '',
- deptBudgetTotal: 0,
- pageSize: 10,
- searchType: '',
- searchTypeText: '待审核',
- searchKeyWord: '',
- inOutType: '',
- contractType: 2,
- warehouseType:1,
- auditdata:[],
- fieldrationsshow: false,
- // 提交类型
- submitType: true,
- multipleSelection: [],
- size: 10,
- spanArr: [],
- options1: [],
- id: '',
- avgCost:'',
- customerInfo: {},
- appendixIdss: [],
- paymentScreenshot: '',
- endDate: '',
- startDate: '',
- warehouseName: '',
- goodsName:'0',
- reserves:'',
- goodsList:[],
- compId: localStorage.getItem('ws-pf_compId'),
- historyList: [],
- money: 0,
- interest:'',
- storageFee:'',
- dryingFee:'',
- multipleSelection1: {},
- aduitshow: false,
- distributionshow: false,
- marginshow: false,
- costlist: [],
- pickerBeginDateBefore: {
- disabledDate: (time) => {
- return time.getTime() > Date.now()
- },
- },
- parameter:{
- startDate:'',
- endDate:'',
- },
- date: {
- year: dayjs().format('YYYY'),
- month: dayjs().format('MM'),
- },
- // warehouseList: [],
- currectfocusdata: {},
- customershow: false,
- interestratevalue: {},
- accessoryTFs: false,
- remarkList: false,
- dialogTitle: '',
- titletype: '',
- remark: '',
- baseId:'',
- auditMind:''
- }
- },
- // activated() {
- // this.getList()
- // this.showType = this.isShow
- // },
- activated() {
- if(this.$route.query.status==1){
- this.searchType='2'
- }
- this.value2 = this.getNowTime()
- selectWarehouseSelf({
- compId: localStorage.getItem('ws-pf_compId'),
- })
- .toPromise()
- .then((response) => {
- this.warehouseList = response
- })
- this.getList()
- this.showType = this.isShow
- },
- methods: {
- exportList() {
- let date = new Date()
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var strDate = date.getDate()
- if(strDate<10){
- strDate = '0'+strDate
- }
- var pastdate = new Date(date.getTime() - 24 * 60 * 60 * 1000)
- this.StartDate =pastdate.getFullYear() + '-' + (pastdate.getMonth() + 1) + '-' + (pastdate.getDate()>10?pastdate.getDate():'0'+pastdate.getDate())+' 00:00:00'
- this.$set(this.parameter,'exportStartDate',this.StartDate)
- this.EndDate = '' + year + '-' + month + '-' + strDate+' 00:00:00'
- this.$set(this.parameter,'exportEndDate',this.EndDate)
- this.$forceUpdate();
- this.isShowPrintType = true
-
- },
- startDataChange(e){
- var d = new Date(e);
- let year = d.getFullYear()
- let month = (d.getMonth() + 1)
- month= month<10?'0'+month:month
- let date = d.getDate()<10?'0'+d.getDate():d.getDate()
- let hours = d.getHours()<10?'0'+d.getHours():d.getHours()
- let minutes = d.getMinutes()<10?'0'+d.getMinutes():d.getMinutes()
- let seconds = d.getSeconds()<10?'0'+d.getSeconds():d.getSeconds()
- this.parameter.exportStartDate = year + '-' + month+ '-' +date + ' '+hours+':'+minutes+':'+seconds;
- },
- endDataChange(e){
- var d = new Date(e);
- let year = d.getFullYear()
- let month = (d.getMonth() + 1)
- month= month<10?'0'+month:month
- let date = d.getDate()<10?'0'+d.getDate():d.getDate()
- let hours = d.getHours()<10?'0'+d.getHours():d.getHours()
- let minutes = d.getMinutes()<10?'0'+d.getMinutes():d.getMinutes()
- let seconds = d.getSeconds()<10?'0'+d.getSeconds():d.getSeconds()
- this.parameter.exportEndDate = year + '-' + month+ '-' +date + ' '+hours+':'+minutes+':'+seconds;
- },
- removePrint() {
- this.parameter.warehouseName = ''
- this.isShowPrintType = false
- },
- // warehouseQuery(query){
- // if(query){
- // this.warehouseList = this.warehouseAllXiaLa
- // this.warehouseList = this.warehouseAllXiaLa.filter(item=>item.warehouseName.indexOf(query)>-1)
- // }else{
- // this.warehouseList = this.warehouseXiaLaCopy
- // }
- // },
- async submitClick() {
- if (!this.parameter.exportStartDate) {
- this.$message.error('请选择起始日期')
- return
- }
- if (!this.parameter.exportEndDate) {
- this.$message.error('请选择截止日期')
- return
- }
- if (new Date(this.parameter.exportEndDate).getTime() < new Date(this.parameter.exportStartDate).getTime()) {
- this.$message.error('截止日期输入错误')
- return
- }
- if (this.parameter.warehouseName == '全部仓库') {
- this.parameter.warehouseName = ''
- }
- this.isShowPrintType = false
- const {
- data
- } = await exportOrder({
- exportStartDate: this.parameter.exportStartDate,
- exportEndDate: this.parameter.exportEndDate,
- warehouseName: this.parameter.warehouseName,
- }, {}, {
-
- responseType: 'blob'
- }).toPromise()
- downloadFile({
- res: data,
- fileName: `${this.date.year + (this.date.month ? `-${this.date.month}` : '')
- }导出入库单`,
- type: 'xls',
- })
- this.parameter.warehouseName = ''
- },
- weightGreaterChange(e){
- this.getList()
- },
- getSummaries(param) {
- const { columns, data } = param;
- const sums = [];
- columns.forEach((column, index) => {
- if (index === 0) {
- sums[index] = '合计';
- return;
- }
- const values = data.map(item => Number(item[column.property]));
- if (!values.every(value => isNaN(value))) {
- if (index == 8 || index == 9 || index == 10 || index == 11 || index == 12 || index == 13 || index == 14 || index == 15) {
- sums[index] = values.reduce((prev, curr) => {
- const value = Number(curr);
- if (!isNaN(value)) {
- return prev + curr;
- } else {
- return prev;
- }
- }, 0).toFixed(3)
- }
- } else {
- sums[index] = '';
- }
- });
- return sums;
- },
- warehouseNameChange(e) {
- if (e == '全部仓库' || e == '') {
- this.warehouseName = ''
- this.goodsList = []
- this.goodsName = '0'
- this.baseId = ''
- }else{
- for(let i =0 ; i<this.warehouseList.length;i++){
- if(this.warehouseList[i].warehouseName == e){
- console.log(this.warehouseList[i])
- if(this.warehouseList[i].goodsNameInfos){
- for(let j = 0;j<this.warehouseList[i].goodsNameInfos.length;j++){//构造数据,合并重复货名
- if(j==0){
- this.goodsList.push(this.warehouseList[i].goodsNameInfos[j])
- }else{
- //
- if(this.goodsList.every((item)=>{return item.goodsName != this.warehouseList[i].goodsNameInfos[j].goodsName}) ){
- this.goodsList.push(this.warehouseList[i].goodsNameInfos[j])
- }else{
- for(let n = 0;n < this.goodsList.length;n++){
- if(this.goodsList[n].goodsName == this.warehouseList[i].goodsNameInfos[j].goodsName){
- this.goodsList[n].storage += this.warehouseList[i].goodsNameInfos[j].storage
- }
- }
- }
- //
- }
- }
- }
-
- this.baseId = this.warehouseList[i].id
-
- break
- }
- // console.log(this.reserve)
- if(this.reserves){
- this.reserves=this.reserves.toFixed(3)
- }
- }
- this.goodsName= '0'
- this.reserves = ''
- }
- this.warehouseXiaLaCopy = this.warehouseList
- this.warehouseAllXiaLa = this.warehouseList
- this.multipleSelection1={}
- this.getList()
- },
- goodsNameChange(e){
- if (e == '全部货名' || e == '0') {
- this.goodsName = '0'
- this.reserves = ''
- }else{
- this.goodsName = this.goodsList[e-1].goodsName
- this.reserves = this.goodsList[e-1].storage
- }
- this.multipleSelection1={}
- this.getList()
- },
- handleClose5() {
- this.dialogVisiblecontent = false
- },
- qingkuan(item) {
- this.titletype = '请款金额'
- this.currectfocusdata = item
- this.textarea = this.currectfocusdata.requestFunds
- this.dialogVisiblecontent = true
- },
- inputremark(item) {
- this.titletype = '备注内容'
- this.currectfocusdata = item
- this.textarea = this.currectfocusdata.remark
- this.dialogVisiblecontent = true
- },
- handlequeren() {
- if (this.titletype == '请款金额') {
- this.dialogVisiblecontent = false
- this.currectfocusdata.requestFunds = this.textarea
- console.log(this.currectfocusdata, textarea)
- this.$forceUpdate()
- } else {
- this.dialogVisiblecontent = false
- this.currectfocusdata.remark = this.textarea
- this.$forceUpdate()
- }
- },
- interestratesubmit() {
- setenabledinfo({ id: this.interestratevalue.id, value: this.interestratevalue.value }).toPromise()
- .then((response) => {
- this.$message({
- message: '修改利率成功',
- type: 'success'
- });
- this.interestrateshow = false
- })
- },
- warehousefocus() {
- getposition({ baseId: this.fieldrationsList.baseId, flag: 1 }).toPromise()
- .then((response) => {
- // row.weightedit=false
- this.options = response
- })
- },
- warehousechange(e) {
- for (let i = 0; i < this.options.length; i++) {
- if (this.options[i].binNumber == e) {
- this.fieldrationsList.beforePositionId = this.options[i].id
- }
- }
- },
- warehouseweightfocus(){
- },
- warehousefocus1() {
- getposition({ baseId: this.fieldrationsList.baseId }).toPromise()
- .then((response) => {
- // row.weightedit=false
- this.options1 = response
- })
- },
- warehousechange1(e) {
- for (let i = 0; i < this.options1.length; i++) {
- if (this.options1[i].binNumber == e) {
- this.fieldrationsList.afterPositionId = this.options1[i].id
- }
- }
- },
- fujian(row) {
- this.id = row.id
- this.accessoryTFs = true
- console.log(row.addressUrl.indexOf('http'))
- if (row.addressUrl.indexOf('http') != -1) {
- if (row.addressUrl.split(',')) {
- var arr = row.addressUrl.split(',')
- this.dataList = []
- for (var i = 0; i < arr.length; i++) {
- this.dataList.push({ url: arr[i] })
- }
- this.appendixIdss = arr
- this.paymentScreenshot = arr
- }
- } else {
- this.appendixIdss = row.addressUrl
- }
- console.log(this.appendixIdss)
- },
- lookRemark(row) {
- if (row.remark) {
- this.remark = row.remark
- this.remarkList = true
- }
- else {
- this.$message({
- message: '暂无请款备注',
- type: 'warning'
- });
- }
- },
- handle(status) {
- this.searchType = status
- this.getList()
- },
- selectinOutType() {
- this.getList()
- },
- handleSelectionChange(val, item, index) {
- console.log(val, item)
- for (let i = 0; i < this.gainList.length; i++) {
- if (this.gainList[i].warehouseName == item.warehouseName) {
- for (let q = 0; q < this.gainList[i].warehousingOrderList.length; q++) {
- if (!item.payshow) {
- this.gainList[i].warehousingOrderList[q].select = false
- }
- }
- }
- }
- for (let i = 0; i < val.length; i++) {
- if (!item.payshow) {
- if (val[i].amountNotPayable <= 0) {
- this.$message({
- message: '请选择未付大于零的条目!',
- type: 'warning'
- });
- var that = this
- setTimeout(() => {
- that.$refs[`multipleTable${index}`][0].toggleRowSelection(val[i], false);
- }, 1000)
- } else {
- val[i].select = true
- }
- }
- }
- item.summation = 0
- for (let i = 0; i < val.length; i++) {
- if (val[i].surplusWeight) {
- item.summation += Number(val[i].surplusWeight)
- }
- }
- if(item.summation){
- item.summation = item.summation.toFixed(3)
- }
- this.$forceUpdate()
- // console.log(val,item.summation,1111111111)
- this.multipleSelection1[item.id] = val
- // this.multipleSelection=this.noRepeat(this.multipleSelection.concat(val))
- // console.log(this.multipleSelection)
- },
- noRepeat(arr) {
- var newArr = [...new Set(arr)]; //利用了Set结构不能接收重复数据的特点
- return newArr
- },
- editWeight(row) {
- row.weightedit = true
- },
- editMoisture(row) {
- row.edit = true
- this.$forceUpdate()
- },
- changeWeight(row) {
- if (row.inWarehouseWeight1 < row.outWarehouseWeight) {
- this.$message({
- message: '入库量不能小于出库量',
- type: 'warning'
- });
- return
- }
- this.$confirm('确定提交入库重量?', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- editwarehousingorder({ id: row.id, inWarehouseWeight: row.inWarehouseWeight1 }).toPromise()
- .then((response) => {
- // row.weightedit=false
- this.getList()
- })
- })
- },
- changeMoisture(row) {
- if (row.weightedMoisture < 14 || row.weightedMoisture > 80) {
- this.$message({
- message: '加权水分输入错误',
- type: 'warning'
- });
- return
- }
- this.$confirm('确定提交加权水分?', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- editwarehousingorder({ id: row.id, weightedMoisture: row.weightedMoisture }).toPromise()
- .then((response) => {
- // row.weightedit=false
- this.getList()
- })
- })
- },
- withdraw(item) {
- if(!this.multipleSelection1[item.id]){
- this.$message({
- message: '至少选择一条请款审核中的条目',
- type: 'error'
- });
- }
- else{
- var arr1 = this.multipleSelection1[item.id]
- for (let i = 0; i < arr1.length; i++) {
- if (!arr1[i].approveStatus || arr1[i].approveStatus == '发起人撤回') {
- this.$message({
- message: '请选择请款审核中的条目进行撤回',
- type: 'warning'
- });
- return
- } else {
- this.$confirm(`撤回成功后,可再次提交,确定撤回该次请款吗?`, {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- type: 'warning',
- }).then(() => {
- var arr4 = this.unique(arr1)
- for (let j = 0; j < arr4.length; j++) {
- sponsorWithdraw({
- workflowId: arr4[j].workflowId,
- businessKey: arr4[j].batchId,
- }).toPromise()
- .then((response) => {
- this.$message.success('撤回成功')
- })
- // updateApprove({
- // batchId: arr4[j].batchId,
- // }).toPromise()
- // .then((response) => {
- // })
- }
- })
- }
- }
- this.getList()
- }
- },
- unique(arr) {
- const res = new Map();
- return arr.filter((arr) => !res.has(arr.batchId) && res.set(arr.batchId, 1));
- },
- payout(item) {
- console.log(item)
- if (localStorage.getItem('ws-pf_roleName') == '销售内勤' || localStorage.getItem('ws-pf_roleName') == '采购内勤'||localStorage.getItem('ws-pf_roleName').indexOf('专员')> -1) {
- if (Object.keys(this.multipleSelection1).length != 0 && this.multipleSelection1[item.id].length > 0) {
- for (let i = 0; i < this.multipleSelection1[item.id].length; i++) {
- if (item.warehouseName == this.multipleSelection1[item.id][i].warehouseName) {
- if (this.multipleSelection1[item.id][i].inType == '移库入库' || this.multipleSelection1[item.id][i].inType == '退库入库') {
- this.$message({
- message: '请选择收购入库或采购入库的条目!',
- type: 'warning'
- });
- return
- }
- if (this.multipleSelection1[item.id][i].amountNotPayable <= 0) {
- this.$message({
- message: '请选择未付大于零的条目!',
- type: 'warning'
- });
- return
- }
- if (this.multipleSelection1[item.id][i].amountNotPayable > 0 && this.multipleSelection1[item.id][i].approveStatus
- && this.multipleSelection1[item.id][i].approveStatus !='发起人撤回') {
- this.$message({
- message: '请选择未请款的条目!',
- type: 'warning'
- });
- return
- }
- }
- }
- item.payshow = false
- for (let i = 0; i < this.multipleSelection1[item.id].length; i++) {
- if (item.warehouseName == this.multipleSelection1[item.id][i].warehouseName) {
- this.multipleSelection1[item.id][i].requestFunds = this.multipleSelection1[item.id][i].amountNotPayable
- this.multipleSelection1[item.id][i].select = true
- }
- }
- } else {
- this.$message({
- message: '至少选择一条待请款条目!',
- type: 'warning'
- });
- }
- } else {
- this.$message({
- message: '暂无此权限!',
- type: 'warning'
- });
- }
- },
- marginAllocation() {
- let _this = this
- var arr = []
- var currectData = []
- for (const key in this.multipleSelection1) {
- var array = this.multipleSelection1[key]
- for (let i = 0; i < array.length; i++) {
- arr.push(array[i])
- }
- if (array.length > 0) {
- currectData = array
- }
- }
- if (arr.length > 1) {
- this.$message({
- message: '一次只能分配一条入库记录',
- type: 'warning'
- });
- return
- }
- if (currectData.length == 0) {
- this.$message({
- message: '请选择一条数据!',
- type: 'warning'
- });
- return
- }
- // console.log(currectData)
- var arr1 = currectData
- for (let i = 0; i < arr1.length; i++) {
- if (arr1[i].amountNotPayable < 0) {
- this.$message({
- message: '请选择一条有未付金额的条目!',
- type: 'warning'
- });
- return
- }
- if (arr1[i].inType != '采购入库' && arr1[i].inType != '收购入库') {
- this.$message({
- message: '请选择货源是采购合同或收购合同的条目',
- type: 'warning'
- });
- return
- }
- _this.dialogTitle = arr1[i].contractNo
- getExpense({ contractNo: arr1[i].contractNo, compId: this.compId }).toPromise()
- .then((response) => {
- _this.form.contractId = response.id
- _this.form.accumulatedPrepayment = response.accumulatedMargin
- _this.form.recoveryPrepayments = response.withdrawalOfMargin
- _this.form.distributionEd = response.allocatedMargin
- _this.form.distributionCan = response.accumulatedMargin - response.withdrawalOfMargin - response.allocatedMargin
- _this.form.distributionNot = arr1[i].amountNotPayable
- this.currectdata = currectData
- this.marginshow = true
- }).catch(() => {
- this.$message({
- message: '无可分配金额',
- type: 'warning'
- });
- return
- })
- }
- },
- interestrate() {
- this.interestrateshow = true
- },
- async fieldrations() {
- let _this = this
- console.log(this.multipleSelection1)
- var arr = []
- var arr3 = []
- var currectData = []
- for (const key in this.multipleSelection1) {
- var array = this.multipleSelection1[key]
- for (let i = 0; i < array.length; i++) {
- if(array[i].surplusWeight <=0){
- continue
- }
- arr.push(array[i])
- if (arr3.length == 0) {
- arr3.push(array[i])
- } else {
- var arr2 = arr3.filter((item) => { return item.warehouseName == array[i].warehouseName })
- if (arr2.length == 0) {
- arr3.push(array[i])
- }
- }
- }
- }
- currectData = arr
- if (currectData.length == 0) {
- this.$message({
- message: '请选择一条数据!',
- type: 'warning'
- });
- return
- }
- // console.log(arr1)
- let map = new Map();
- for (let item of currectData) {
- map.set(item.goodsName, item);
- }
- var data = [...map.values()];
- if (data.length > 1) {
- this.$message({
- message: '请选择同一个货名的数据进行折干!',
- type: 'warning'
- });
- return
- }
- if (arr3.length > 1) {
- this.$message({
- message: '请选择同一个仓库的数据进行折干!',
- type: 'warning'
- });
- return
- }
- // console.log(currectData)
- var arr1 = currectData
- for (let i = 0; i < arr1.length; i++) {
- if (arr1[i].warehouseType != 1) {
- this.$message({
- message: '请选择常用库潮粮进行折干!',
- type: 'warning'
- });
- return
- }
- if (arr1[i].goodsName.indexOf('潮粮') == -1) {
- this.$message({
- message: '只有潮粮可以折干!',
- type: 'warning'
- });
- return
- }
- if (!arr1[i].weightedMoisture || arr1[i].weightedMoisture < 14) {
- this.$message({
- message: '加权水分不可小于干粮水分!',
- type: 'warning'
- });
- return
- }
- // _this.dialogTitle=arr1[i].contractNo
- }
- var weight = 0
- for (let i = 0; i < arr1.length; i++) {
- console.log(arr1[i].surplusWeight)
- weight += Number(arr1[i].surplusWeight)
- }
- // this.currectdata=item
- this.currectdata = arr1
- this.fieldrationsList.warehousingOrderList = this.currectdata
- this.fieldrationsList.baseId = this.currectdata[0].baseId
- this.fieldrationsList.beforeWeight = weight.toFixed(3)
- var response=await getbyname({ warehouseId: this.currectdata[0].baseId, goodsName: this.currectdata[0].goodsName }).toPromise()
- let count = 0
- for(let i = 0;i<arr1.length;i++){
- let array =[]
- array.push(arr1[i])
- var response1=await getdryweight({ warehousingOrderList: array }).toPromise()
- if (response) {
- let weight2 = 0
- for (let i = 0; i < this.currectdata.length; i++) {
- var weightedMoisture = (this.currectdata[i].weightedMoisture - 14)
- var deductWeight = 100 - (weightedMoisture * response.deductWeight)
- }
- count =Number(count)+ Number(response1)
- this.fieldrationsList.warehousingOrderList[i].afterWeight = response1
- this.fieldrationsshow = true
- }
- }
- this.fieldrationsList.afterWeight = count.toFixed(3)
- // this.fieldrationsList.beforeCost=this.currectdata[0].avgCost
- },
- distribution() {
- let _this = this
- console.log(this.multipleSelection1)
- var arr = []
- var currectData = []
- for (const key in this.multipleSelection1) {
- var array = this.multipleSelection1[key]
- for (let i = 0; i < array.length; i++) {
- arr.push(array[i])
- }
- if (array.length > 0) {
- currectData = array
- }
- }
- if (arr.length > 1) {
- this.$message({
- message: '一次只能分配一条入库记录',
- type: 'warning'
- });
- return
- }
- if (currectData.length == 0) {
- this.$message({
- message: '请选择一条数据!',
- type: 'warning'
- });
- return
- }
- // console.log(currectData)
- var arr1 = currectData
- for (let i = 0; i < arr1.length; i++) {
- if (arr1[i].amountNotPayable < 0) {
- this.$message({
- message: '请选择一条有未付金额的条目!',
- type: 'warning'
- });
- return
- }
- if (arr1[i].inType != '采购入库' && arr1[i].inType != '收购入库') {
- this.$message({
- message: '请选择货源是采购合同或收购合同的条目',
- type: 'warning'
- });
- return
- }
- _this.dialogTitle = arr1[i].contractNo
- getExpense({ contractNo: arr1[i].contractNo, compId: this.compId }).toPromise()
- .then((response) => {
- _this.form.contractId = response.id
- _this.form.accumulatedPrepayment = response.accumulatedPrepayment
- _this.form.recoveryPrepayments = response.accumulatedRecovery
- _this.form.distributionEd = response.prepaidAssigned
- _this.form.distributionCan = response.accumulatedPrepayment - response.accumulatedRecovery - response.prepaidAssigned
- _this.form.distributionNot = arr1[i].amountNotPayable
- }).catch(() => {
- this.$message({
- message: '无可分配金额',
- type: 'warning'
- });
- return
- })
- }
- // this.currectdata=item
- this.currectdata = arr1
- this.distributionshow = true
- },
- getNowTime() {
- const start = new Date(new Date().getTime() - 3600 * 1000 * 24)
- .toISOString()
- .replace('T', ' ')
- .split('.')[0] //默认开始时间1天前
- const end = new Date(new Date().getTime())
- .toISOString()
- .replace('T', ' ')
- .split('.')[0]//默认结束时间今天
- // console.log([start.split(' '), end])
- return [start.split(' ')[0], end.split(' ')[0]]
- },
- cancel(item) {
- item.payshow = true
- for (let i = 0; i < this.multipleSelection1[item.id].length; i++) {
- if (item.warehouseName == this.multipleSelection1[item.id][i].warehouseName) {
- this.multipleSelection1[item.id][i].select = false
- }
- }
- },
- costclick(row) {
- this.interest=row.interest
- this.storageFee=row.storageFee
- this.dryingFee = row.dryingFee
- this.costlist = row.expenseAllocationInfoList
- console.log(this.interest,this.storageFee)
- this.dialogVisible1 = true
- // getexenseinfo({id:row.id}).toPromise()
- // .then((response) => {
- // this.costlist=response
- // }).catch(() => {
- // })
- },
- selectInit(row, index) {
- if (localStorage.getItem('ws-pf_roleName') == '销售内勤' || localStorage.getItem('ws-pf_roleName') == '采购内勤'||localStorage.getItem('ws-pf_roleName').indexOf('专员')> -1) {
- return true
- } else if (localStorage.getItem('ws-pf_staffName') == '杜大光') {
- return true
- } else if (localStorage.getItem('ws-pf_staffName') == '范占国') {
- return true
- } else if (localStorage.getItem('ws-pf_roleName') == '财务') {
- return true
- } else if (localStorage.getItem('ws-pf_roleName') == '出纳') {
- return true
- }else if (localStorage.getItem('ws-pf_deptName') == '单证中心') {
- return true
- } else {
- return false
- }
- },
- onChange() {
- this.$refs.upload
- .handleSaveBill()
- .then(async response => {
- this.paymentScreenshot = response
- })
- .catch(res => {
- EventBus.$emit('error', (JSON.parse(res) || {}).message)
- this.$refs.upload.clearFiles()
- })
- },
- handleRemove(file) {
- // console.log(file)
- for (let i = 0; i < this.paymentScreenshot.length; i++) {
- if (this.paymentScreenshot[i] == file.url) {
- this.paymentScreenshot.splice(i, 1)
- }
- }
- },
- submit(item) {
- var arr1 = this.multipleSelection1[item.id]
- for (let i = 0; i < arr1.length; i++) {
- if (!arr1[i].requestFunds) {
- this.$message({
- message: '请款金额不能为空!',
- type: 'warning'
- });
- return
- }
- if (arr1[i].approveStatus && arr1[i].approveStatus!='发起人撤回') {
- this.$message({
- message: '至少选择一条待请款条目',
- type: 'warning'
- });
- return
- }
- if (arr1[i].requestFunds > arr1[i].amountNotPayable) {
- this.$message({
- message: '请款金额不能大于未付金额!',
- type: 'warning'
- });
- return
- }
- }
- // for (let i = 0; i < arr1.length; i++) {
- // if(arr[i].inType=='收购入库'){
- // arr[i].inWarehouseWeight=arr[i].inWarehouseWeight*1000
- // }
- // }
- this.$confirm('确认提交请款信息', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- paymoney({ flag: 1, warehousingOrderList: arr1 }).toPromise()
- .then((response) => {
- this.$message({
- message: '提交成功',
- type: 'success'
- });
- this.getList()
- }).catch(() => {
- this.$message({
- message: '提交失败',
- type: 'warning'
- });
- })
- }).catch(() => {
- return false
- })
- },
- paymentsubmit(item) {
- var that = this
- console.log(this.multipleSelection1, this.multipleSelection1[this.currectdata.id])
- var arr2 = this.multipleSelection1[this.currectdata.id]
- console.log(this.paymentScreenshot)
- var len = this.paymentScreenshot ? this.paymentScreenshot.split(',') : []
- if (len.length == 0) {
- this.$message({
- message: '请上传付款截图',
- type: 'warning'
- });
- return
- }
- for (let i = 0; i < arr2.length; i++) {
- if (arr2[i].addressUrlArray) {
- arr2[i].addressUrlArray = arr2[i].addressUrlArray.concat(len)
- }
- else {
- arr2[i].addressUrlArray = len
- }
- arr2[i].addressUrl = arr2[i].addressUrlArray.toString()
- }
- console.log(arr2)
- paymoney({ flag: 0, warehousingOrderList: arr2 }).toPromise()
- .then((response) => {
- this.$message({
- message: '付款成功',
- type: 'success'
- });
- this.aduitshow = false
- this.paymentScreenshot = ''
- this.$refs.upload.clearFiles()
- this.getList()
- }).catch(() => {
- this.$message({
- message: '付款失败',
- type: 'warning'
- });
- })
- },
- afterWeightchange(e) {
- this.fieldrationsList.afterCost = (Number(this.fieldrationsList.beforeWeight) * Number(this.fieldrationsList.beforeCost)) / Number(e)
- },
- fieldrationssubmit() {
- var arr2 = this.currectdata
- if (!this.fieldrationsList.beforeWeight) {
- this.$message({
- message: '折干前重量不能为空',
- type: 'warning'
- });
- return
- }
- if (this.fieldrationsList.beforeWeight <= 0) {
- this.$message({
- message: '折干前重量输入错误',
- type: 'warning'
- });
- return
- }
- // if(!this.fieldrationsList.beforeBinNo){
- // this.$message({
- // message: '折干前仓位不能为空',
- // type: 'warning'
- // });
- // return
- // }
- if (!this.fieldrationsList.afterWeight) {
- this.$message({
- message: '折干后重量不能为空',
- type: 'warning'
- });
- return
- }
- if (this.fieldrationsList.afterWeight <= 0) {
- this.$message({
- message: '折干后重量输入错误',
- type: 'warning'
- });
- return
- }
- if (Number(this.fieldrationsList.afterWeight) > Number(this.fieldrationsList.beforeWeight)) {
- this.$message({
- message: '折干后重量输入错误',
- type: 'warning'
- });
- return
- }
- if (!this.fieldrationsList.afterBinNo) {
- this.$message({
- message: '折干后仓位不能为空',
- type: 'warning'
- });
- return
- }
- this.$confirm('确定提交折干?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- dryout(this.fieldrationsList).toPromise()
- .then((response) => {
- this.$message({
- message: '折干成功',
- type: 'success'
- });
- this.form.distributionIng = ''
- this.$set(this.fieldrationsList,'beforeBinNo','')
- this.$set(this.fieldrationsList,'afterBinNo','')
- // this.fieldrationsList.beforeBinNo = ''
- // this.fieldrationsList.afterBinNo = ''
- this.fieldrationsshow = false
- selectWarehouseSelf({
- compId: localStorage.getItem('ws-pf_compId'),
- })
- .toPromise()
- .then((response) => {
- this.warehouseList = response
- this.warehouseNameChange(this.warehouseName)
- })
- this.getList()
- }).catch((response) => {
- if (response.code == null) {
- this.$message({
- message: response.data.message,
- type: 'warning'
- });
- } else {
- this.$message({
- message: '折干失败',
- type: 'warning'
- });
- }
- })
- }).catch(() => {
- // this.$message({
- // type: 'info',
- // message: '已取消删除'
- // });
- });
- },
- marginsubmit(item) {
- var arr2 = this.currectdata
- if (this.form.distributionIng > this.form.distributionCan) {
- this.$message({
- message: '超出可分配金额',
- type: 'warning'
- });
- return
- }
- if (this.form.distributionIng > this.form.distributionNot) {
- this.$message({
- message: '超出未付金额',
- type: 'warning'
- });
- return
- }
- this.$confirm('确定提交分配金额?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- paymoney({ flag: 3, money: this.form.distributionIng, warehousingOrderList: arr2, contractId: this.form.contractId }).toPromise()
- .then((response) => {
- this.$message({
- message: '分配成功',
- type: 'success'
- });
- this.form.distributionIng = ''
- this.marginshow = false
- this.getList()
- }).catch(() => {
- this.$message({
- message: '分配失败',
- type: 'warning'
- });
- })
- }).catch(() => {
- // this.$message({
- // type: 'info',
- // message: '已取消删除'
- // });
- });
- },
- distributionsubmit() {
- var arr2 = this.currectdata
- if (this.form.distributionIng > this.form.distributionCan) {
- this.$message({
- message: '超出可分配金额',
- type: 'warning'
- });
- return
- }
- if (this.form.distributionIng > this.form.distributionNot) {
- this.$message({
- message: '超出未付金额',
- type: 'warning'
- });
- return
- }
- this.$confirm('确定提交分配金额?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- paymoney({ flag: 2, money: this.form.distributionIng, warehousingOrderList: arr2, contractId: this.form.contractId }).toPromise()
- .then((response) => {
- this.$message({
- message: '分配成功',
- type: 'success'
- });
- this.form.distributionIng = ''
- this.distributionshow = false
- this.getList()
- }).catch(() => {
- this.$message({
- message: '分配失败',
- type: 'warning'
- });
- })
- }).catch(() => {
- // this.$message({
- // type: 'info',
- // message: '已取消删除'
- // });
- });
- },
- lookcustomer(row) {
- this.customerInfo = row
- this.customershow = true
- },
- payment(item) {
- if (localStorage.getItem('ws-pf_roleName') == '出纳') {
- this.money = 0
- var moneyarr = this.multipleSelection1[item.id]
- // console.log(moneyarr)
- for (let i = 0; i < this.multipleSelection1[item.id].length; i++) {
- if (this.multipleSelection1[item.id][i].warehouseName == item.warehouseName) {
- if (this.multipleSelection1[item.id][i].addressUrl) {
- this.multipleSelection1[item.id][i].addressUrlArray = this.multipleSelection1[item.id][i].addressUrl.split(',')
- }
- this.money = Number(this.money) + Number(this.multipleSelection1[item.id][i].requestFunds)
- if (this.multipleSelection1[item.id][i].approveStatus !== null || this.multipleSelection1[item.id][i].requestFunds == 0) {
- this.$message({
- message: '请勾选一条待付款的条目',
- type: 'warning'
- })
- return
- }
- }
- }
- this.form.name = this.money.toFixed(2)
- this.currectdata = item
- if (moneyarr && moneyarr.length > 0) {
- // if(moneyarr[0].inType=='采购入库'){
- // getpayeeinfo({compId: localStorage.getItem('ws-pf_compId'),contractNo:moneyarr[0].contractNo}).toPromise()
- // .then((response) => {
- // this.payeeinfo=response
- // this.aduitshow=true
- // })
- // }else if(moneyarr[0].inType=='收购入库'){
- // getbuypayeeinfo({compId: localStorage.getItem('ws-pf_compId'),customerName:moneyarr[0].customer}).toPromise()
- // .then((response) => {
- // this.payeeinfo=response
- // })
- // }
- this.payeeinfo = moneyarr
- this.aduitshow = true
- } else {
- this.$message({
- message: '至少勾选一条待付款的条目',
- type: 'warning'
- })
- }
- } else {
- this.$message({
- message: '暂无此权限!',
- type: 'warning'
- })
- }
- },
- aduit(row) {
- var arr2 = this.multipleSelection1[row.id]
- if(!this.multipleSelection1[row.id]){
- this.$message({
- message: '至少选择一条待审核的条目',
- type: 'error'
- });
- }
- // console.log(arr2)
- if (arr2.length == 0) {
- if (localStorage.getItem('ws-pf_staffName') == '杜大光') {
- this.$message({
- message: '至少选择一条待决策人审核的条目',
- type: 'error'
- });
- return
- } else if (localStorage.getItem('ws-pf_roleName') == '财务') {
- this.$message({
- message: '至少选择一条待财务审核的条目',
- type: 'error'
- });
- return
- }
- }
- for (let i = 0; i < arr2.length; i++) {
- if (!arr2[i].approveStatus) {
- this.$message({
- message: '至少选择一条待审核的条目',
- type: 'error'
- });
- return
- }
- if (!arr2[i].taskId) {
- this.$message({
- message: '至少选择一条待审核的条目',
- type: 'error'
- });
- return
- }
- }
- var arr3 = this.filtertask(arr2)
-
- this.$confirm('审核请款信息', {
- confirmButtonText: '通过',
- cancelButtonText: '驳回',
- distinguishCancelAndClose: true,
- type: 'warning',
- })
- .then(() => {
- this.title1='通过'
- this.auditdata=arr3
- this.rejectshow=true
- // this.aduithandle(arr3, 0, true)
- }).catch((action) => {
- console.log(action)
- if (action == 'cancel') {
- this.title1='驳回'
- this.auditdata=arr3
- this.rejectshow=true
- // this.aduithandle(arr3, 0, false)
- }
- })
- },
- rejectclick(){
- if(this.title1=='通过'){
- this.aduithandle(this.auditdata, 0, true)
- }else{
- this.aduithandle(this.auditdata, 0, false)
- }
- },
- aduithandle(item, index, status) {
- if (index < item.length) {
- workflowhandle({
- taskId: item[index].taskId,
- approved: status,
- auditMind: this.auditMind,
- needReapply: true,
- }).toPromise()
- .then((response) => {
- this.aduithandle(item, index + 1, status)
- }).catch(() => {
- if (status) {
- this.$message({
- message: '通过失败',
- type: 'error'
- });
- } else {
- this.$message({
- message: '驳回失败',
- type: 'error'
- });
- }
- })
- } else {
- if (status) {
- this.$message({
- message: '通过成功',
- type: 'success'
- });
- this.getList()
- } else {
- this.$message({
- message: '驳回成功',
- type: 'success'
- });
- this.rejectshow=false
- this.getList()
- }
- this.rejectshow = false
- }
- },
- //查找
- lookUp() {
- this.currentPage = 1
- this.getList()
- },
- warehousingorder() {
- this.dialogVisible = true
- },
- datechange(e) {
- this.value2 = e
- this.getList()
- console.log(e)
- },
- getList() {
- this.startDate = this.value2[0]
- this.endDate = this.value2[1]
- getenabledinfo({ functionType: 2 }).toPromise()
- .then((response) => {
- this.interestratevalue = response
- })
- getwarehousingorder({
- compId: localStorage.getItem('ws-pf_compId'),
- startDate: this.startDate,
- endDate: this.endDate,
- currentPage: this.currentPage,
- pageSize: this.pageSize,
- baseId: this.baseId,
- searchType: this.searchType,
- searchKeyWord: this.searchKeyWord,
- goodsName:this.goodsName!='0'?this.goodsName:'',
- weightGreater:this.weightGreater
- })
- .toPromise()
- .then((response) => {
- for (let i = 0; i < response.records.length; i++) {
- response.records[i].payshow = true
- var data = response.records[i].warehousingOrderList
- for (let q = 0; q < data.length; q++) {
- if (data[q].inType == '收购入库') {
- data[q].inWarehouseWeight1 = Number((data[q].inWarehouseWeight).toFixed(3))
- data[q].surplusWeight = ((data[q].inWarehouseWeight) - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
- } else {
- data[q].inWarehouseWeight1 = data[q].inWarehouseWeight.toFixed(3)
- data[q].surplusWeight =(data[q].inWarehouseWeight - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
- }
- data[q].avgCost = Number(data[q].avgCost).toFixed(2)
- data[q].amountMoney = Number(data[q].amountMoney).toFixed(4)
- console.log(response.records[i].warehouseType)
- data[q].select = false
- data[q].weightedit = false
- data[q].edit = false
- data[q].warehouseType = response.records[i].warehouseType
- }
- }
- this.gainList = response.records
- // this.currentPage = response.current
- // this.pageSize = response.size
- console.log(this.gainList, 96)
- this.deptBudgetTotal = response.total
- })
- },
- multiFilter(array, filters) {
- const filterKeys = Object.keys(filters)
- // filters all elements passing the criteria
- return array.filter((item) => {
- // dynamically validate all filter criteria
- return filterKeys.every(key => {
- //ignore when the filter is empty Anne
- if (!filters[key].length) return true
- return !!~filters[key].indexOf(item[key])
- })
- })
- },
- copare(arr) {
- // 缓存用于记录
- const newArr = [];
- for (const t of arr) {
- // 检查缓存中是否已经存在
- if (
- newArr.find(
- (c) =>
- c.issuingTime === t.issuingTime
- )
- ) {
- // 已经存在说明以前记录过,现在这个就是多余的,直接忽略
- continue;
- }
- console.log(t)
- // 不存在就说明以前没遇到过,把它记录下来
- newArr.push(t);
- }
- // var results=this.makeGroupData(newArr,function (item) { return [item.issuingTime]; }); console.log(results)
- // 记录结果就是过滤后的结果
- return newArr;
- },
- filtertask(arr) {
- const newArr = [];
- for (const t of arr) {
- if (
- newArr.find(
- (c) =>
- c.taskId === t.taskId
- )
- ) {
- continue;
- }
- newArr.push(t);
- }
- return newArr;
- },
- getSpanArr(data) {
- let that = this
- //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
- that.spanArr = []
- that.pos = 0
- //遍历数据
- data.forEach((item, index) => {
- //判断是否是第一项
- // if (index === 0) {
- // this.spanArr.push(1)
- // this.pos = 0
- // } else {
- //不是第一项时,就根据标识去存储
- if (data[index].warehouseNumViewList.length > 1) {
- // 查找到符合条件的数据时每次要把之前存储的数据+1
- this.spanArr[this.pos] = data[index].warehouseNumViewList.length
- this.spanArr.push(0)
- } else {
- // 没有符合的数据时,要记住当前的index
- this.spanArr.push(1)
- this.pos = index
- }
- // }
- })
- },
- //查看//传参
- nocomplete(row) {
- this.$router.push({
- path: 'inOutWarehousetaskEdit',
- query: {
- relevanceId: row.relevanceId,
- businessKey: row.id,
- workflowId: row.workflowId,
- },
- })
- },
- dateFormat(fmt, date) {
- let ret
- const opt = {
- 'Y+': date.getFullYear().toString(), // 年
- 'm+': (date.getMonth() + 1).toString(), // 月
- 'd+': date.getDate().toString(), // 日
- 'H+': date.getHours().toString(), // 时
- // "M+": date.getMinutes().toString(), // 分
- // "S+": date.getSeconds().toString() // 秒
- // 有其他格式化字符需求可以继续添加,必须转化成字符串
- }
- for (let k in opt) {
- ret = new RegExp('(' + k + ')').exec(fmt)
- if (ret) {
- fmt = fmt.replace(
- ret[1],
- ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
- )
- }
- }
- return fmt
- },
- handleClose() {
- this.aduitshow = false
- },
- handleClose6() {
- this.rejectshow = false
- },
- handleClose3() {
- this.customershow = false
- },
- handleClose1() {
- this.form.distributionIng = ''
- this.distributionshow = false
- },
- handleClose2() {
- this.form.distributionIng = ''
- this.marginshow = false
- },
- handleClose4() {
- this.fieldrationsList.afterWeight = 0
- this.fieldrationsshow = false
- },
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`)
- this.pageSize = val
- this.getList()
- },
- handleCurrentChange(val) {
- this.currentPage = val
- console.log(`当前页: ${val}`)
- this.getList()
- },
- editClick(row) {
- var status = ''
- if (row.taskStatus == '待审核' || row.taskStatus == '已完成') {
- status = '执行中'
- } else if (row.taskStatus == '执行中') {
- status = '已完成'
- }
- //cancelButtonClass: "btn-custom-cancel"
- this.$confirm(`是否将状态改为${status}`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- movestates({
- id: row.id
- })
- .toPromise()
- .then((response) => {
- this.$notify.success({
- title: '成功',
- message: '状态修改成功',
- })
- this.getList()
- })
- .catch((response) => {
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
- })
- })
- .catch(() => {
- return false
- })
- },
- selecttaskType(e) {
- for (var i = 0; i < this.taskTypeList.length; i++) {
- if (this.taskTypeList[i].value == e) {
- this.searchType = this.taskTypeList[i].type
- }
- }
- this.currentPage = 1,
- this.getList()
- },
- handleExamine(row) {
- this.$router.push({
- name: 'salesContractExamine',
- query: {
- id: row.id
- },
- })
- },
- // 关闭 dialog时 处理文件url 初始化upload组件
- handleCloe() {
- this.dialogViewSpareMoney = false
- },
- history(row) {
- billoperatehis({
- id: row.id
- })
- .toPromise()
- .then((response) => {
- this.historyList = response
- })
- },
- find() {
- this.currentPage = 1
- this.getList()
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- /deep/.el-form-item {
- margin: 0;
- }
- /deep/.el-table .cell .el-input {
- width: 92%;
- }
- .el-select {
- width: 100%;
- margin-right: 10px;
- }
- .col1 {
- width: 50%;
- }
- .audit {
- margin-bottom: 20px;
- border-bottom: 1px solid #AFB3BF;
- height: 70px;
- .audit_item {
- width: 100%;
- display: flex;
- height: 30px;
- .audit_name {
- margin-right: 30px;
- font-size: 16px;
- font-weight: 600;
- }
- .audit_left {
- width: 60%;
- }
- .audit_date {
- width: 40%;
- justify-content: flex-end;
- display: flex;
- color: #AFB3BF;
- }
- }
- .audit_opinion {}
- }
- /deep/.el-form {
- width: 90%;
- }
- /deep/.el-upload--picture-card {
- width: 100px;
- height: 100px;
- line-height: 100px;
- }
- /deep/.el-table .cell .el-input {
- padding: 10px;
- }
- //打印弹窗
- .mask {
- background: black;
- width: 100vw;
- height: 100vh;
- position: fixed;
- top: 0;
- z-index: 99;
- opacity: 0.3;
- }
- .count {
- text-align: center;
- margin-bottom: 10px;
- }
- .print-type {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- margin: auto;
- width: 400px;
- height: 250px;
- background: white;
- border-radius: 10px;
- z-index: 999;
- .bottom-btn {
- margin-top: 10px;
- text-align: center;
- }
- }
- .print-type-title {
- text-align: center;
- font-size: 18px;
- // margin: 20px;
- margin: 20px 20px 10px;
- }
- .print-type-checkbox {
- padding-left: 20px;
- .el-date-editor.el-input {
- width: 85% !important;
- }
- .proportion_css {
- width: 85%;
- }
- }
- /deep/.el-table td,/deep/.el-table th{
- text-align: center;
-
- }
- </style>
|