123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464 |
- //采购订单
- <template>
- <div>
- <BaseHeaderLayout :leftSpan="15">
- <template slot="left"> </template>
- <template slot="right">
- <span style="width: 70px; display: inline-block;color: #8890B1;">状态:</span>
- <ws-select
- v-model="searchTypeText"
- placeholder=""
- class="typeselect"
- @change="selecttaskType"
- :value="searchType"
- >
- <ws-option
- v-for="item in taskTypeList"
- :key="item.value"
- :label="item.value"
- :value="item.value"
- style="color: #8890B1;"
- />
- </ws-select>
- <ws-input
- v-model="searchKeyWord"
- placeholder="可按合同编号或客户查找"
- clearable
- maxlength="500"
- type="input"
- ></ws-input>
- <ws-button class="find" type="primary" @click="find()"
- ><img
- width="16"
- height="16"
- style="
- vertical-align: text-top;
- position: relative;
- top: 0px;
- left: -5px;
- "
- src="../../../public/img/sousuo.png"
- alt=""
- /></ws-button>
- <!-- </div> -->
- </template>
- </BaseHeaderLayout>
- <el-table
- :data="warehouseList.records"
- size="small"
- element-loading-text="正在查询中。。。"
- border
- fit
- highlight-current-row
- height="700"
- >
- <el-table-column type="index" label="序号" width="50"></el-table-column>
- <el-table-column class="table_td" prop="contractNo" label="合同编号" width="100"></el-table-column>
- <el-table-column class="table_td" prop="procurementPlan" label="采购计划" width="125"></el-table-column>
- <el-table-column class="table_td" prop="customer" label="客户">
- <template slot-scope="scope">
- <div class="record" @click="customer(scope.row)">{{scope.row.customer}}</div>
- </template>
- </el-table-column>
- <el-table-column class="table_td" width="100" prop="unitPrice" label="单价(元/吨)">
- <template slot-scope="scope">
- {{scope.row.unitPrice}}
- <i @click="Changepricerecord(scope.row)" class="iconfont icon-lishi"></i>
- </template>
- </el-table-column>
- <el-table-column class="table_td" width="100" prop="basis" label="基差(元/吨)">
- <template slot-scope="scope">
- <span v-if='!scope.row.basischange&&scope.row.basis'>{{scope.row.basis}}</span>
- <input v-if='scope.row.basischange' style='width:60px;' v-model='basis' type="text">
- <i @click='changebasis(scope.row)' v-if='scope.row.basischange' class="iconfont icon-dui"></i>
- <img v-if='!scope.row.basischange&&scope.row.basis'
- width="17"
- height="18"
- style="vertical-align: text-top; position: relative; top: -1px"
- src="../../../public/img/edit.png"
- @click="editbasis(scope.row)"
- alt=""
- />
- <span v-if='!scope.row.basis'>-</span>
- </template>
- </el-table-column>
- <el-table-column class="table_td" prop="freezingDeposit" label="冻结定金(元)" width="90"></el-table-column>
- <el-table-column class="table_td" prop="defaultDeposit" label="拖欠定金(元)" width="100"></el-table-column>
- <el-table-column width="100" class="table_td" prop="unloadingCharge" label="卸车费(元/吨)"></el-table-column>
- <el-table-column width="100" class="table_td" prop="invoiceFee" label="发票费(元/吨)"></el-table-column>
- <el-table-column class="table_td" prop="transactionsNumber" label="合同重量(吨)" width="100"></el-table-column>
- <el-table-column class="table_td" prop="stockInQuantity" label="已入库量(吨)" width="90"></el-table-column>
- <el-table-column class="table_td" prop="openPosition" label="可平仓量(吨)" width="90" ></el-table-column>
- <el-table-column class="table_td" prop="closedPosition" label="已平仓量(吨)" width="90">
- <template slot-scope="scope">
- {{scope.row.closedPosition}}
- <i @click="closedPosition(scope.row)" class="iconfont icon-lishi"></i>
- </template>
- </el-table-column>
- <el-table-column class="table_td" prop="cumulativeTurnover" label="已成交量(吨)" width="90">
- <template slot-scope="scope">
- {{scope.row.cumulativeTurnover}}
- <i @click="transactionRecord(scope.row)" class="iconfont icon-lishi"></i>
- </template>
- </el-table-column>
- <el-table-column class="table_td" label="发票类型" prop="type"></el-table-column>
- <el-table-column class="table_td" label="包装方式" prop='packingType'></el-table-column>
- <el-table-column prop="status" label="状态">
- <template slot-scope="scope">
- <el-popover
- placement="left"
- :width="285"
- trigger="click"
- visible-arrow="false"
- @show="history(scope.row)"
- >
- <template>
- <span slot="reference">
- <span v-if="scope.row.status == '待审核'" class="executory"></span>
- <span v-if="scope.row.status == '已成交'" class="inExecution"></span>
- <span v-if="scope.row.status == '已完成'" class="done"></span>
- {{ scope.row.status }}
- </span>
- </template>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column class="table_td" label="更新时间" prop="updateDate" width="130"></el-table-column>
- <el-table-column class="table_td" label="入库结算" prop="updateDate" width="130"></el-table-column>
- <el-table-column class="table_td" label="平仓结算" prop="updateDate" width="130"></el-table-column>
- <el-table-column prop="seller" label="操作" width="310">
- <template slot-scope="scope">
- <div v-if='scope.row.status=="已通过"||scope.row.status=="已成交"' class="record" @click="makeabargain(scope.row)">成交</div>
- <!-- 补充定金 -->
- <div v-if='scope.row.defaultDeposit>0' class="record" @click="addthedeposit(scope.row)">补充定金</div>
- <div v-if='scope.row.freezingDeposit>0' class="record" @click='unfreeze(scope.row)'>解冻定金</div>
- <!-- 平仓 -->
- <div v-if='scope.row.openPosition>0' class="record" @click="cloaeposition1(scope.row)">平仓</div>
- <div v-if='scope.row.status=="已通过"||scope.row.status=="已成交"' class="record" @click="handle(scope.row)">完成</div>
- <!-- 审核 -->
- <div v-if='scope.row.status=="待审核"' type="text" class="record" @click="aduit(scope.row)">审核</div>
- <div v-if='scope.row.status=="待审核"' class="record" @click="deletehandle(scope.row)">删除</div>
- </template>
- </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>
- <el-dialog
- width="30%"
- title="成交"
- :visible.sync="dialogFormVisible1"
- :append-to-body="true"
- >
- <el-form ref="warehouseList">
- <el-form-item
- label="成交价(元/吨)"
- prop="transactionPrice"
- :label-width="formLabelWidth"
- >
- <el-input
- v-model="clinchdeal1.transactionPrice"
- autocomplete="off"
- placeholder="请输入成交价"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item
- label="成交量(吨)"
- prop="transactionsNumber"
- :label-width="formLabelWidth"
- >
- <el-input
- v-model="clinchdeal1.turnover"
- autocomplete="off"
- placeholder="请输入成交量(吨)"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="基差(元/吨)" prop="basis" :label-width="formLabelWidth">
- <el-input
- v-model="clinchdeal1.basis"
- autocomplete="off"
- placeholder="请输入基差"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="成交日期" prop="submissionDate" :label-width="formLabelWidth" class="deal">
- <ws-date-picker
- v-model="clinchdeal1.dealDate"
- type="date"
- placeholder="请选择成交日期"
- value-format="yyyy-MM-dd"
- class="deal"
- />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible1 = false">取 消</el-button>
- <el-button type="primary" @click=" chengjiao()">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog
- width="20%"
- title="补充定金"
- :visible.sync="dialogFormVisible3"
- :append-to-body="true"
- >
- <el-form :model="form">
- <h5 style=" margin-left:30px;">{{replenishlist.customer}}</h5>
- <el-form-item label="拖欠定金" :label-width="formLabelWidth">
- {{replenishlist.defaultDeposit}}
- </el-form-item>
- <el-form-item label="可用定金" :label-width="formLabelWidth">
- {{replenishlist.totalDeposit-replenishlist.freezingDeposit}}
- </el-form-item>
- <el-form-item label="补充金额" :label-width="formLabelWidth">
- <el-input
- v-model="replenishlist.money"
- autocomplete="off"
- placeholder="请输入补充金额"
- class="deal"
- ></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible3 = false">取 消</el-button>
- <el-button type="primary" @click="replenish">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog
- width="25%"
- title="平仓"
- :visible.sync="dialogFormVisible2"
- :append-to-body="true"
- >
- <el-form class='closeposition'>
- <el-form-item label="成交价格(元/吨)" prop="transactionPrice" >
- <ws-select
- v-model="closePositionList1.transactionPrice"
- placeholder
- class="deal"
- placeholder="请输入成交价"
- >
- <ws-option
- v-for="item in transactionRecordList"
- :key="item.constKey"
- :label="item.transactionPrice"
- :value="item.transactionPrice"
- />
- </ws-select>
- </el-form-item>
- <el-form-item label="可平仓数量(吨)" prop="openPosition" >
- <el-input v-model="closePositionList1.openPosition" autocomplete="off" class="deal"></el-input>
- </el-form-item>
- <el-form-item label="平仓数量(吨)" prop="closingQuantity" >
- <el-input
- v-model="closePositionList1.closingQuantity"
- autocomplete="off"
- placeholder="请输入平仓数量"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="平仓价格(元/吨)" prop="closeRate" >
- <el-input
- v-model="closePositionList1.closeRate"
- autocomplete="off"
- placeholder="请输入平仓价格"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="平仓基差(元/吨)" prop="closingBasis" >
- <el-input
- v-model="closePositionList1.basis"
- autocomplete="off"
- placeholder="请输入平仓基差"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="平仓应付(元)" prop="closingPositionPayable">
- <el-input
- v-model="closePositionList1.closingPositionPayable"
- autocomplete="off"
- placeholder="请输入平仓价格"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="平仓日期" prop="closePositionDate" >
- <el-date-picker
- v-model="closePositionList1.closePositionDate"
- type="date"
- placeholder="选择日期"
- format="yyyy 年 MM 月 dd 日"
- value-format="yyyy-MM-dd"/>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible2 = false">取 消</el-button>
- <el-button type="primary" @click="closepositionconfirm()">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog
- width="30%"
- title="审核"
- :visible.sync="dialogFormVisible4"
- :append-to-body="true"
- >
- <el-form >
- <el-form-item label="交易类型" :label-width="formLabelWidth">
- {{aduitlist.type}}
- </el-form-item>
- <el-form-item label="交易目标" :label-width="formLabelWidth">
- {{aduitlist.tradingTarget}}
- </el-form-item>
- <el-form-item label="卖方" :label-width="formLabelWidth">
- {{aduitlist.seller}}
- </el-form-item>
- <el-form-item label="卖方电话" :label-width="formLabelWidth">
- {{aduitlist.sellerPhone}}
- </el-form-item>
- <el-form-item label="交易数量(吨)" :label-width="formLabelWidth">
- {{aduitlist.transactionsNumber}}
- </el-form-item>
- <el-form-item label="提交时间" :label-width="formLabelWidth">
- {{aduitlist.createDate}}
- </el-form-item>
- <el-form-item label="包装方式" :label-width="formLabelWidth">
- <ws-select
- v-model="aduitlist.packingType"
- placeholder
- class="deal"
- @change="selectpackingType"
- >
- <ws-option
- v-for="item in packingTypeList"
- :key="item.constKey"
- :label="item.constValue"
- :value="item.constValue"
- />
- </ws-select>
- </el-form-item>
- <el-form-item v-if='aduitlist.packingType!="散装"' label="袋装备注" :label-width="formLabelWidth">
- <el-input maxlength='30'
- v-model="aduitlist.baggingNotes"
- autocomplete="off"
- placeholder="请输入袋装备注,最多30个字"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="发票类型" :label-width="formLabelWidth">
- <ws-select
- v-model="aduitlist.type"
- placeholder
- class="deal"
- @change="selectType"
- >
- <ws-option
- v-for="item in invoiceList"
- :key="item.constKey"
- :label="item.constValue"
- :value="item.constValue"
- />
- </ws-select>
- </el-form-item>
- <el-form-item label="单价(元/吨)" :label-width="formLabelWidth">
- <el-input
- v-model="aduitlist.unitPrice"
- autocomplete="off"
- placeholder="请输入单价"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="基差(元/吨)" :label-width="formLabelWidth">
- <el-input
- v-model="aduitlist.basis"
- autocomplete="off"
- placeholder="请输入基差"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="发票费用(元/吨)" :label-width="formLabelWidth">
- <el-input
- v-model="aduitlist.invoiceFee"
- autocomplete="off"
- placeholder="请输入发票费用"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="卸车费用(元/吨)" :label-width="formLabelWidth">
- <el-input
- v-model="aduitlist.unloadingCharge"
- autocomplete="off"
- placeholder="请输入卸车费用"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="合同编号" :label-width="formLabelWidth">
- <ws-select v-model="aduitlist.contractNo" placeholder="请选择合同编号" class="deal">
- <ws-option
- v-for="item in contractNolist"
- :key="item.constKey"
- :label="item.contractNo"
- :value="item.contractNo"/>
- </ws-select>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible4 = false">取 消</el-button>
- <el-button type="primary" @click="aduitconfirm">通过</el-button>
- </div>
- </el-dialog>
- <el-dialog
- width="30%"
- title="客户信息"
- :visible.sync="dialogFormVisible8"
- :append-to-body="true"
- >
- <el-form class='customer' :model="form">
- <h4 v-if='customerlist.customerTypeFlag!=1'>营业执照</h4>
- <img v-if='customerlist.customerTypeFlag!=1' width="50%" :src="customerlist.businessLicenseAddressUrl" alt />
- <el-form-item v-if='customerlist.customerTypeFlag!=1' label="公司名称" :label-width="formLabelWidth">
- <!-- <el-input v-model="form.region" autocomplete="off" class="deal"></el-input> -->
- </el-form-item>
- <el-form-item v-if='customerlist.customerTypeFlag!=1' label="纳税人识别号" :label-width="formLabelWidth">
- <!-- <el-input v-model="form.region" autocomplete="off" class="deal" ></el-input> -->
- </el-form-item>
- <div class='flex'>
- <div style='flex:1;text-align:center;'>
- <h4>身份证正面</h4>
- <img width="100%" :src="customerlist.cardAddressUrl1" alt />
- </div>
- <div style='flex:1;text-align:center;'>
- <h4>身份证反面</h4>
- <img width="100%" :src="customerlist.cardAddressUrl2" alt />
- </div>
- </div>
- <el-form-item label="姓名" :label-width="formLabelWidth">
- {{customerlist.customerName}}
- </el-form-item>
- <el-form-item label="身份证号" :label-width="formLabelWidth">
- {{customerlist.customerNumberCard}}
- </el-form-item>
- <div class='flex'>
- <div style='flex:1;text-align:center;'>
- <h4>银行卡正面</h4>
- <img width="100%" :src="customerlist.payeeAddressUrl1" alt />
- </div>
- <div style='flex:1;text-align:center;'>
- <h4>银行卡反面</h4>
- <img width="100%" :src="customerlist.payeeAddressUrl2" alt />
- </div>
- </div>
- <el-form-item label="银行卡号" :label-width="formLabelWidth">
- {{customerlist.bankCard}}
- </el-form-item>
- <el-form-item label="开户行" :label-width="formLabelWidth">
- {{customerlist.bankDeposit}}
- </el-form-item>
- <el-form-item label="开户支行" :label-width="formLabelWidth">
- {{customerlist.bankDepositBranch}}
- </el-form-item>
- <el-form-item label="手机号" :label-width="formLabelWidth">
- {{customerlist.customerPhone}}
- </el-form-item>
- <el-form-item label="公司地址" :label-width="formLabelWidth">
- {{customerlist.compAddress}}
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible8 = false">取 消</el-button>
- </div>
- </el-dialog>
- <el-dialog
- width="40%"
- title="成交记录"
- :visible.sync="dialogFormVisible6"
- :append-to-body="true"
-
- >
- <el-table :data="transactionRecordList" >
- <el-table-column prop="transactionPrice" label="成交价">
- </el-table-column>
- <el-table-column prop="basis" label="基差" >
- </el-table-column>
- <el-table-column prop="turnover" label="成交量">
- </el-table-column>
- <el-table-column prop="dealDate" label="成交日期">
- </el-table-column>
- </el-table>
- </el-dialog>
- <!-- 平仓记录 -->
- <el-dialog
- width="40%"
- title="平仓记录"
- :visible.sync="dialogFormVisible7"
- :append-to-body="true"
- >
- <el-table :data="closePositionList">
- <el-table-column prop="transactionPrice" label="成交价">
- </el-table-column>
- <el-table-column prop="transactionPrice" label="平仓价">
- </el-table-column>
- <el-table-column prop="basis" label="基差" >
- </el-table-column>
- <el-table-column prop="turnover" label="成交量">
- </el-table-column>
- <el-table-column prop="dealDate" label="成交日期">
- </el-table-column>
- </el-table>
- </el-dialog>
- <el-dialog
- width="10%"
- title="改价记录"
- :visible.sync="dialogFormVisible5"
- :append-to-body="true"
- >
- <div v-for='item in pricechange'>
- <div >{{item.priceType}}{{item.price}}</div>
- <div >{{item.updateDate}}</div>
- </div>
-
- </el-dialog>
- </div>
- <!-- </div> -->
- </template>
- <script>
- import {
- woekflowhandle,
- } from '@/model/tasksport/index'
- import { packList } from '@/model/contarct/index'
- import { detailsList, chengList ,closePositionList,aduitpurchase,aduitcontractno,editStatus,deletepurchase} from '@/model/purchasingManagement/index'
- import { downloadFile } from '@/utils/batchDown'
- import Pagination from '@/components/Pagination'
- import WsUpload from '@/components/WsUpload'
- import { dayjs, fmoney, EventBus } from 'base-core-lib'
- export default {
- name: 'viewSpareMoney',
- components: {
- WsUpload,
- Pagination
- },
- watch: {
- vesselId(val) {
- this.getList()
- },
- isShow(val) {
- this.showType = val
- }
- },
- data() {
- return {
- dialogFormVisible1: false,
- dialogFormVisible2: false,
- dialogFormVisible3: false,
- dialogFormVisible4: false,
- dialogFormVisible5: false,
- dialogFormVisible6: false,
- dialogFormVisible7: false,
- dialogFormVisible8: false,
- dialogVisible: false,
- dialogImageUrl:"",
- form: {
- transactionPrice: '',
- transactionsNumber: '',
- basis: '',
- submissionDate: ''
- // delivery: false,
- // type: [],
- // resource: '',
- // desc: ''
- },
- formLabelWidth: '120px',
- basischange:false,
- barWidth: 0,
- barHeight: 0,
- retioX: 1,
- ratioY: 1,
- isTaped: false,
- isHover: false,
- isShow: !this.autohide,
- clinchdeal:{},
- clinchdeal1:{},
- //弹出框
- dialogViewSpareMoney: false,
- dialogApproveFormVisible: false,
- // 船舶类型
- monetaryKey: null,
- // 表格显示数据
- tableDate: [],
- // 是否显示
- showType: true,
- // 年
- year: '',
- pickerOptions: {},
- value2: '',
- deptBudgetTotal: 0,
- currentPage: 1,
- tranTypeKey: 1,
- pageSize: 10,
- searchType: '',
- searchTypeText: '未完成',
- searchKeyWord: '',
- contractType: 2,
- enter: {
- closePositionList:[],
- },
- transactionRecordList:[],
- taskTypeList:[
- {value:'待审核',type:1},
- {value:'执行中',type:2},
- {value:'已完成',type:3},
- {value:'全部订单',type:''},
- ],
- // 提交类型
- submitType: true,
- size: 10,
- spanArr: [],
- contractNo: '',
- customerlist:{},
- packingTypeList:[],
- inOutTaskNo: '',
- compId: sessionStorage.getItem('ws-pf_compId'),
- deptCircularPage: {},
- warehouseList: [],
- deptBudgetList: {},
- pcFlag:1,
- invoiceList:[],
- contractNolist:[],
- pricechange:[],
- aduitlist:{
- unloadingCharge:0
- },
- basis:0,
- replenishlist:{},
- closePositionList1:{},
- transactionRecordList:{},
- closePositionList:[],
- historyList: [],
- pickerBeginDateBefore: {
- disabledDate: time => {
- return time.getTime() > Date.now()
- }
- },
- accessoryTFs: false
- }
- },
- activated() {
- // this.loaddata()
- this.getList()
- this.showType = this.isShow
- },
- methods: {
- handle(item){
- this.$confirm(`状态修改为已完成后不可再进行交易操作,是否确定修改?`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- editStatus({id:item.id,flag:2}).toPromise()
- .then(response => {
- this.$message.success('修改成功')
- this.getList()
- }).catch(req => {
- this.$message.success('修改失败')
- })
- })
- },
- makeabargain(item){
- this.dialogFormVisible1 = true
- this.clinchdeal.id=item.id
- this.clinchdeal.commonId=item.commonId
- },
- deletehandle(item){
- this.$confirm(`采购订单删除后不可恢复,是否确定删除?`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- deletepurchase({id:item.id}).toPromise().then(response => {
- this.$message.success('删除订单成功')
- this.getList()
- }).catch(req => {
- this.$message.success('删除订单失败')
- })
- })
- },
- closepositionconfirm(){
- this.closePositionList1.compId=sessionStorage.getItem('ws-pf_compId')
- closePositionList(this.closePositionList1).toPromise()
- .then(response => {
- this.$message.success('平仓成功')
- this.getList()
- }).catch(req => {
- this.$message.warning('平仓失败')
- })
- },
- cloaeposition1(item){
- this.dialogFormVisible2 = true
- this.$set(this.closePositionList1,'id',item.id)
- this.transactionRecordList=item.transactionRecordList
- this.$set(this.closePositionList1,'openPosition',item.openPosition)
- this.$set(this.closePositionList1,'transactionsNumber',item.transactionsNumber)
- this.$set(this.closePositionList1,'contractNo',item.contractNo)
- this.$set(this.closePositionList1,'planId',item.planId)
- this.$set(this.closePositionList1,'closeRate',item.closeRate)
- this.$set(this.closePositionList1,'seller',item.seller)
- this.$set(this.closePositionList1,'commonId',item.commonId)
- },
- changebasis(item){
- editStatus({basis:this.basis,id:item.id,flag:3}).toPromise()
- .then(response => {
- this.$message.success('修改基差成功')
- this.getList()
- }).catch(req => {
- this.$message.success('修改基差失败')
- })
- },
- unfreeze(item){
- this.$confirm(`确定解冻订单(${item.procurementPlan})的定金?`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- editStatus({id:item.id,flag:1}).toPromise()
- .then(response => {
- this.$message.success('解冻定金成功')
- this.getList()
- }).catch(req => {
- this.$message.success('解冻定金失败')
- })
- })
- },
- editbasis(item){
- this.basis=item.basis
- item.basischange=true
- },
- replenish(){
- this.dialogFormVisible3 = false
- if(!this.replenishlist.money){
- this.$message({
- message: '补充金额不能为空!',
- type: 'warning'
- })
- return
- }
- if(String(this.replenishlist.money).indexOf('.') != -1 &&
- String(this.replenishlist.money).length -
- (String(this.replenishlist.money).indexOf('.') + 1) >
- 2){
- this.$message({
- message: '补充金额输入错误!',
- type: 'warning'
- })
- return
- }
- if(this.replenishlist.money>this.replenishlist.defaultDeposit){
- this.$message({
- message: '补充金额不能超过拖欠定金!',
- type: 'warning'
- })
- return
- }
- if(this.replenishlist.money>(this.replenishlist.totalDeposit-this.replenishlist.freezingDeposit)){
- this.$message({
- message: '补充金额不能超过可用定金!',
- type: 'warning'
- })
- return
- }
- editStatus({money:this.replenishlist.money,id:this.replenishlist.id,flag:0}).toPromise()
- .then(response => {
- this.$message.success('补充成功')
- this.getList()
- }).catch(req => {
- this.$message.success('补充失败')
- })
- },
- addthedeposit(item){
- this.dialogFormVisible3 = true
- this.$set(this.replenishlist,'id',item.id)
- this.$set(this.replenishlist,'customer',item.customer)
- this.$set(this.replenishlist,'defaultDeposit',item.defaultDeposit)
- this.$set(this.replenishlist,'totalDeposit',item.customerInfo.totalDeposit)
- this.$set(this.replenishlist,'freezingDeposit',item.freezingDeposit)
- },
- aduit(item){
- this.dialogFormVisible4 = true
- this.aduitlist.id=item.id
- this.aduitlist.type='采购'
- this.$set(this.aduitlist,'seller',item.seller)
- this.$set(this.aduitlist,'sellerPhone',item.sellerPhone)
- this.$set(this.aduitlist,'tradingTarget',item.tradingTarget)
- this.$set(this.aduitlist,'transactionsNumber',item.transactionsNumber)
- this.$set(this.aduitlist,'createDate',item.createDate)
- this.$set(this.aduitlist,'packingType',item.packingType)
- this.$set(this.aduitlist,'packingTypeKey',item.packingTypeKey)
- this.$set(this.aduitlist,'taskId',item.taskId)
- this.$set(this.aduitlist,'type',item.type)
- this.$set(this.aduitlist,'typeKey',item.typeKey)
- },
- aduitconfirm(){
- if (!this.aduitlist.unitPrice) {
- this.$message({
- message: '单价不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.aduitlist.basis) {
- this.$message({
- message: '基差不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.aduitlist.contractNo) {
- this.$message({
- message: '合同编号不能为空!',
- type: 'warning'
- })
- return
- }
- if (this.aduitlist.packingTypeKey!=1&&this.aduitlist.baggingNotes.length>30) {
- this.$message({
- message: '袋装备注最长不能超过30字!',
- type: 'warning'
- })
- return
- }
- if (
- this.aduitlist.unitPrice&&String(this.aduitlist.unitPrice).indexOf('.') != -1 &&
- String(this.aduitlist.unitPrice).length -
- (String(this.aduitlist.unitPrice).indexOf('.') + 1) >
- 2||this.aduitlist.unitPrice>100000||this.aduitlist.unitPrice<1){
- this.$message({
- message: '单价输入错误',
- type: 'warning'
- })
- return
- }
- if (
- this.aduitlist.basis&&String(this.aduitlist.basis).indexOf('.') != -1 &&
- String(aduitlist.basis).length -
- (String(this.aduitlist.basis).indexOf('.') + 1) >
- 2||this.aduitlist.basis>10000||this.aduitlist.basis<1){
- this.$message({
- message: '基差输入错误',
- type: 'warning'
- })
- return
- }
- if (
- this.aduitlist.unloadingCharge&&String(this.aduitlist.unloadingCharge).indexOf('.') != -1 &&
- String(aduitlist.unloadingCharge).length -
- (String(this.aduitlist.unloadingCharge).indexOf('.') + 1) >
- 2||this.aduitlist.unloadingCharge>1000||this.aduitlist.unloadingCharge<0){
- this.$message({
- message: '卸车费用输入错误',
- type: 'warning'
- })
- return
- }
- this.aduitlist.unloadingCharge=-this.aduitlist.unloadingCharge
- this.aduitlist.basis=-this.aduitlist.basis
- this.dialogFormVisible4 = false
- this.$confirm(`审核通过后,将通知客户订单生效,是否确定通过审核?`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- aduitpurchase(this.aduitlist)
- .toPromise()
- .then(response => {
- this.$message.success('审核成功')
- this.getList()
- })
- })
- },
- Changepricerecord(item){
- this.dialogFormVisible5 = true
- this.pricechange=item.priceChangeRecordList
- },
- closedPosition(item){
- this.dialogFormVisible7 = true
- this.closePositionList=item.closePositionList
- },
- transactionRecord(item){
- this.dialogFormVisible6 = true
- this.transactionRecordList=item.transactionRecordList
- },
-
- customer(item){
- this.dialogFormVisible8 = true
- if(item.customerInfo){
- this.customerlist=item.customerInfo
- this.customerlist.cardAddressUrl1=this.customerlist.cardAddressUrl.split(',')[0]
- this.customerlist.cardAddressUrl2=this.customerlist.cardAddressUrl.split(',')[1]
- this.customerlist.payeeAddressUrl1=this.customerlist.payeeAddressUrl.split(',')[0]
- this.customerlist.payeeAddressUrl2=this.customerlist.payeeAddressUrl.split(',')[1]
- }
- },
-
- //成交
- chengjiao() {
-
- if (!this.clinchdeal1.transactionPrice) {
- this.$message({
- message: '成交价不能为空',
- type: 'warning'
- })
- return
- }
- this.$confirm(`确定提交成交信息`, {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- type: 'warning'
- })
- .then(() => {
- chengList({transactionRecord:this.clinchdeal1,id:this.clinchdeal.id,commonId:this.clinchdeal.commonId,compId:sessionStorage.getItem('ws-pf_compId')})
- .toPromise()
- .then((response) => {
- this.$message.success('成交成功')
- this.dialogFormVisible1 = false
- // this.$router.go(-1)
- })
- .catch(() => {
- return false
- })
- })
-
- },
- selectpackingType(e) {
- for (var i = 0; i < this.packingTypeList.length; i++) {
- if (this.packingTypeList[i].constValue == e) {
- this.dataList.packingTypeKey = this.packingTypeList[i].constKey
- }
- }
- },
- selectType(e) {
- for (var i = 0; i < this.invoiceList.length; i++) {
- if (this.invoiceList[i].constValue == e) {
- this.dataList.typeKey = this.invoiceList[i].constKey
- }
- }
- },
- getList() {
- detailsList({
- compId: sessionStorage.getItem('ws-pf_compId'),
- currentPage: this.currentPage,
- pageSize: this.pageSize,
- pcFlag: this.pcFlag,
- searchType: this.searchType,
- searchKeyWord: this.searchKeyWord,
- })
- .toPromise()
- .then(response => {
- for(var i=0;i<response.records.length;i++){
- response.records[i].basischange=false
- response.records[i].openPosition=response.records[i].cumulativeTurnover-response.records[i].closedPosition-response.records[i].stockInQuantity
- }
- this.warehouseList = response
- this.deptCircularPage.currentPage = response.current
- this.deptCircularPage.pageSize = response.size
- this.deptBudgetTotal = response.total
- })
- //包装方式
- packList({ constId: 'PRO2' })
- .toPromise()
- .then(response => {
- this.packingTypeList = response
- })
- // 发票
- packList({ constId: 'PRO5' })
- .toPromise()
- .then(response => {
- this.invoiceList = response
- })
- // 合同编号
- aduitcontractno({compId: sessionStorage.getItem('ws-pf_compId'),flag:0})
- .toPromise()
- .then(response => {
- this.contractNolist = response
- })
- },
- handleRemove(file) {
- console.log(file)
- },
- handlePictureCardPreview(file) {
- this.dialogImageUrl = file.url
- this.dialogVisible = true
- },
- handleDownload(file) {
- console.log(file)
- },
- 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
- }
- }
- })
- },
- //查看
- handleLook(row) {
- this.$router.push({
- path: 'warehouseManagementPutOutLook',
- query: {
- relevanceId: row.relevanceId
- }
- })
- },
- //返回
- revert() {
- this.$router.push({ path: 'warehouseManagementList' })
- },
- 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.accessoryTFs = 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.status == '待审核' || row.status == '已完成') {
- status = '执行中'
- } else if (row.status == '执行中') {
- status = '已完成'
- }
- //cancelButtonClass: "btn-custom-cancel"
- this.$confirm(`是否将状态改为${status}`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(() => {
- alsostate({ 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
- }
- }
- },
- // fujian(row) {
- // if (
- // row.receiveAttachmentPath === null ||
- // row.receiveAttachmentPath === ''
- // ) {
- // EventBus.$emit(
- // 'warning',
- // this.$t('system.noticeCircular.NoInformation')
- // )
- // } else {
- // this.accessoryTFs = true
- // }
- // this.appendixIdss = row.receiveAttachmentPath
- // },
- handleExamine(row) {
- this.$router.push({
- name: 'salesContractExamine',
- query: { id: row.id }
- })
- },
- // 关闭 dialog时 处理文件url 初始化upload组件
- handleCloe() {
- this.dialogViewSpareMoney = false
- },
- history(row) {
- billoperatehis({ id: row.id })
- .toPromise()
- .then(response => {
- this.historyList = response
- })
- },
- //查找
- find() {
- this.currentPage = 1
- this.getList()
- },
- async exportlist() {
- const { data } = await export1(
- {
- compId: sessionStorage.getItem('ws-pf_compId'),
- contractType: this.contractType,
- currentPage: this.currentPage,
- pageSize: this.pageSize,
- searchType: this.searchType,
- searchKeyWord: this.searchKeyWord,
- startDate: this.startDate,
- endDate: this.endDate
- },
- {},
- { responseType: 'blob' }
- ).toPromise()
- downloadFile({
- res: data,
- fileName: `${this.date.year +
- (this.date.month ? `-${this.date.month}` : '')}_采购合同`,
- type: 'xls'
- })
- },
- total() {}
- }
- }
- </script>
- <style lang="scss" scoped>
- .connert {
- width: 90%;
- margin: 0 auto;
- }
- .vertical-text-left {
- width: 62px;
- text-align: right;
- }
- //分页
- .el-pagination {
- padding: 10px 15px;
- margin-bottom: 0;
- text-align: center;
- }
- /deep/.el-pager li.active {
- color: #5878e8;
- cursor: default;
- }
- /deep/.el-pager li:hover {
- color: #5878e8;
- cursor: default;
- }
- .el-button--primary {
- background-color: #5878e8;
- border-color: #5878e8;
- }
- .el-button--default {
- color: #8890b1;
- border-color: #e8eaf1;
- }
- /deep/.base_header_layout .grid-content.right .find.el-button--primary {
- width: 30px;
- margin-left: 0;
- border-top-left-radius: 0px;
- border-bottom-left-radius: 0px;
- }
- /deep/.findValue .el-input__inner {
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0px;
- width: 385px;
- margin-left: 53.5%;
- }
- .completed.el-button--default {
- border-color: #5878e8;
- background-color: #f6f7fc;
- color: #5878e8;
- }
- .putstorage.el-button--default,
- .deliverystorage.el-button--default {
- border-color: #8890b1;
- background-color: #fff;
- color: #8890b1;
- }
- /deep/.el-table td,
- /deep/.el-table th.is-leaf {
- border-right: 1px solid #e9ecf7;
- text-align: center;
- }
- /deep/.el-table tr td:first-child,
- /deep/.el-table tr th.is-leaf:first-child {
- border-left: 1px solid #e9ecf7;
- }
- .record,
- .adjustment {
- display: inline-block;
- color: #5878e8;
- padding: 0 4px !important;
- position: relative;
- font-size: 14px;
- }
- .record:after {
- position: absolute;
- content: '';
- display: block;
- top: 5px;
- right: -2px;
- width: 1px;
- height: 12px;
- // background: #e9ecf7;
- }
- .base_header_layout .grid-content {
- margin-top: 80px;
- }
- .el-input--small .el-input__inner {
- margin-left: 20px;
- }
- .el-range-editor--small.el-input__inner {
- height: 32px;
- margin-left: -20%;
- }
- //执行样式
- .executory,
- .inExecution,
- .done {
- width: 6px;
- height: 6px;
- display: inline-block;
- border-radius: 50%;
- position: relative;
- top: -1px;
- font-size: 14px;
- }
- .executory {
- background: #ff9f24;
- }
- .inExecution {
- background: #5878e8;
- }
- .done {
- background: #50cad4;
- }
- .container {
- overflow: scroll;
- height: 93vh;
- }
- .button-container {
- display: flex;
- flex-wrap: nowrap;
- justify-content: space-between;
- align-items: center;
- background-color: #fff;
- width: 100%;
- height: 50px;
- padding: 0 10px;
- & > div {
- margin-left: 10px;
- display: flex;
- flex-wrap: nowrap;
- flex-direction: row;
- & > span {
- line-height: 50px;
- }
- }
- /deep/.auditFlow-box {
- position: unset;
- margin-left: 10px;
- &/deep/.auditFlow-icon {
- width: auto;
- padding-right: 30px;
- }
- &/deep/.auditFlow-main {
- position: absolute;
- }
- }
- }
- .bg-left {
- padding-left: 30px;
- }
- .title {
- position: relative;
- }
- .title::before {
- content: '';
- display: inline-block;
- width: 5px;
- height: 30px;
- background: #5473e8;
- position: absolute;
- left: 0;
- }
- .el-button--primary {
- background-color: #5878e8;
- border-color: #5878e8;
- // margin-left: 85%;
- margin-top: 20px;
- }
- //导航条样式
- .el-col-12 {
- width: 50%;
- height: 60px;
- background: #f6f7fc;
- border-radius: 4px 4px 1px 1px;
- }
- .el-input--small .el-input__inner {
- height: 32px;
- line-height: 32px;
- width: 385px;
- margin-top: 10px;
- }
- .bg-bottom {
- margin-left: 85%;
- }
- .but {
- margin-left: 30%;
- /* margin-top: -32px; */
- overflow: auto;
- /* float: left; */
- /* margin-left: 1px; */
- margin-left: -10px;
- }
- /deep/.el-table .el-table__header .cell,
- .el-table .el-table__body .cell {
- text-align: center;
- }
- .el-scrollbar__wrap {
- overflow-y: hidden;
- }
- .deal {
- width: 100%;
- }
- .photo {
- padding: 0% 34%;
- }
- .photo1 {
- padding: 0 10%;
- }
- .photo2 {
- padding: 0 55%;
- }
- /deep/.el-form-item--small .el-form-item__label,
- .el-form-item--small .el-form-item__content {
- text-align: center;
- }
- hr {
- width: 91%;
- }
- /deep/.deaal{
- width: 66%;
- margin-left: 9%;
- }
- /deep/.closeposition .el-form-item__label{
- width:160px;
- }
- .customer .el-form-item{
- border-bottom:1px solid #ccc;
- }
- /deep/.base_header_layout .grid-content {
- border-radius: 4px;
- height: 36px;
- line-height: 30px;
- display: -webkit-box;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- text-align: justify;
- margin: 0 auto;
- }
- /deep/.base_header_layout .grid-content.right .find.el-button--primary {
- width: 30px;
- margin-left: 0;
- border-top-left-radius: 0px;
- border-bottom-left-radius: 0px;
- margin-top: -3px;
- // margin-left: -10px;
- }
- /deep/.typeselect .el-input__inner {
- color: #8890b1;
- }
- .chenglu {
- font-size: 14px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #8890B1;
- line-height: 20px;
- }
- // .vertical-text {
- // margin: 0 10px;
- // color: #8890b1;
- // font-size: 12px;
- // margin-top: -4px;
- // }
- // .vertical-circle {
- // width: 10px;
- // height: 10px;
- // border: 2px solid #5878e8;
- // background-color: #ffffff;
- // -webkit-border-radius: 100px;
- // }
- // .vertical-circle:first-child {
- // color: red;
- // }
- </style>
|