1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206 |
- //采购订单
- <template>
- <div>
- <BaseHeaderLayout :leftSpan="15">
- <template slot="left"></template>
- <template slot="right">
- <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
- class='findinput'
- 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: -8px;
- "
- 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"
- >
- <template slot-scope="scope">
- <div class="record"
- @click="lookContract(scope.row)">{{ scope.row.contractNo}}</div>
- </template></el-table-column>
- <el-table-column
- class="table_td"
- prop="procurementPlan"
- label="采购计划"
- width="125"
- >
- <template slot-scope="scope">
- <div class="record"
- @click="lookPlan(scope.row)">{{ scope.row.procurementPlan}}</div>
- </template></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
- v-if="scope.row.procurementPlanType == '期货'"
- @click="Changepricerecord(scope.row)"
- class="iconfont icon-lishi"
- ></i>
- </template>
- </el-table-column>
- <el-table-column
- class="table_td"
- prop="basis"
- label="基差(元/吨)"
- width="100"
- >
- <template slot-scope="scope">
- <div class="inputChenge">
- <span v-if="scope.row.procurementPlanType == '现货'">--</span>
- <span
- v-if="
- scope.row.identification == 'false' &&
- String(scope.row.basis) &&
- scope.row.procurementPlanType == '期货'&&
- String(scope.row.basis)>0
- "
- >{{'+'+scope.row.basis }}</span
- >
- <span
- v-else-if="
- scope.row.identification == 'false' &&
- String(scope.row.basis) &&
- scope.row.procurementPlanType == '期货'&&
- String(scope.row.basis)<=0
- "
- >{{scope.row.basis }}</span
- >
- <input
- v-if="scope.row.identification == 'true'&&scope.row.procurementPlanType == '期货'"
- style="width: 60px"
- v-model="scope.row.basis"
- type="text"
- />
- </div>
- <img
- width="17"
- height="18"
- style="vertical-align: text-top; position: relative; top: -1px"
- src="../../../public/img/edit.png"
- @click="whether(scope.row)"
- v-if="scope.row.identification == 'false'&&scope.row.procurementPlanType == '期货'"
- alt=""
- />
- <i
- class="el-icon-check"
- style="line-height: 29px; margin-left: 10px"
- v-if="scope.row.identification == 'true'&&scope.row.procurementPlanType == '期货'"
- @click="varietyClick(scope.row)"
- ></i>
- </template>
- </el-table-column>
- <el-table-column
- class="table_td"
- prop="freezingDeposit"
- label="冻结定金(元)"
- width="90"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.procurementPlanType == '现货'">--</span>
- <span v-if="scope.row.procurementPlanType == '期货'">{{
- scope.row.freezingDeposit
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- class="table_td"
- prop="defaultDeposit"
- label="拖欠定金(元)"
- width="100"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.procurementPlanType == '现货'">--</span>
- <span v-if="scope.row.procurementPlanType == '期货'">{{
- scope.row.defaultDeposit
- }}</span>
- </template></el-table-column>
- <el-table-column
- width="100"
- class="table_td"
- prop="unloadingCharge"
- label="卸车费(元/吨)"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.procurementPlanType == '现货'">--</span>
- <span v-if="scope.row.procurementPlanType == '期货'">{{
- scope.row.unloadingCharge
- }}</span>
- </template></el-table-column>
- <el-table-column
- width="100"
- class="table_td"
- prop="invoiceFee"
- label="发票费(元/吨)"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.procurementPlanType == '现货'">--</span>
- <span v-if="scope.row.procurementPlanType == '期货'">{{
- scope.row.invoiceFee
- }}</span>
- </template></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"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.procurementPlanType == '现货'">--</span>
- <span v-if="scope.row.procurementPlanType == '期货'">{{
- scope.row.stockInQuantity
- }}</span>
- </template></el-table-column>
- <el-table-column
- class="table_td"
- prop="openPosition"
- label="可平仓量(吨)"
- width="90"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.procurementPlanType == '现货'">--</span>
- <span v-if="scope.row.procurementPlanType == '期货'">{{
- scope.row.openPosition
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- class="table_td"
- prop="closedPosition"
- label="已平仓量(吨)"
- width="90"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.procurementPlanType == '现货'">--</span>
- <span v-if="scope.row.procurementPlanType == '期货'">{{
- scope.row.closedPosition
- }}</span>
- <i
- v-if="scope.row.procurementPlanType == '期货'"
- @click="closedPositionLook(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">
- <span v-if="scope.row.procurementPlanType == '现货'">--</span>
- <span v-if="scope.row.procurementPlanType == '期货'">{{
- scope.row.cumulativeTurnover
- }}</span>
- <i
- v-if="scope.row.procurementPlanType == '期货'"
- @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 prop="packingType" label="包装方式">
- <template slot-scope="scope">
- <el-popover
- v-if="scope.row.packingType != '散装'"
- placement="top"
- :width="160"
- trigger="hover"
- visible-arrow="false"
- >
- <template>
- <span slot="reference">
- {{ scope.row.packingType }}
- </span>
- </template>
- <div>
- <span
- style="margin-left: 6px"
-
- >
- {{ scope.row.baggingNotes }}</span
- >
- </div>
- </el-popover>
- <span v-else>{{ scope.row.packingType }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="status" label="状态">
- <template slot-scope="scope">
- <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>
- </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"
- >
- <template slot-scope="scope" >
- <div
- class="record"
- @click="nocomplete1(scope.row)"
- v-if="scope.row.procurementPlanType != '现货'&&scope.row.receiptUnpaid != null&&scope.row.receiptUnpaid >0">去结算</div>
- <div
- class="record"
- @click="nocomplete1(scope.row)"
- v-else-if="scope.row.procurementPlanType != '现货'&&scope.row.receiptUnpaid != null&&scope.row.receiptUnpaid==0">已结算</div>
- <div v-else>--</div>
- </template>
- </el-table-column >
- <el-table-column
- class="table_td"
- label="平仓结算"
- prop="updateDate"
- width="130">
- <template slot-scope="scope">
- <div
- class="record"
- @click="nocomplete(scope.row)"
- v-if="scope.row.procurementPlanType != '现货'&&scope.row.closedUnpaid != null&&scope.row.closedUnpaid >0">去结算</div>
- <div
- class="record"
- @click="nocomplete(scope.row)"
- v-else-if="scope.row.procurementPlanType != '现货'&&scope.row.closedUnpaid != null&&scope.row.closedUnpaid ==0">已结算</div>
- <div v-else>--</div>
- </template>
- </el-table-column >
- <el-table-column prop="seller" label="操作" width="310">
- <template slot-scope="scope">
- <!-- <div v-if="scope.row.procurementPlanType != '现货'"> -->
- <div
- v-if="
- (scope.row.status == '已通过' || scope.row.status == '已成交') &&
- scope.row.procurementPlanType != '现货'
- "
- class="record"
- @click="makeabargain(scope.row)"
- v-hasPermission="
- `procurement.procurementOrder.deal`
- "
- >
- 成交
- </div>
- <!-- 补充定金 -->
- <div
- v-if="
- scope.row.defaultDeposit > 0 &&
- scope.row.procurementPlanType != '现货'
- "
- class="record"
- @click="addthedeposit(scope.row)"
- v-hasPermission="
- `procurement.procurementOrder.deposit`
- "
- >
- 补充定金
- </div>
- <div
- v-if="
- scope.row.freezingDeposit > 0 &&
- scope.row.procurementPlanType != '现货'
- "
- class="record"
- @click="unfreeze(scope.row)"
- v-hasPermission="
- `procurement.procurementOrder.thaw`
- "
- >
- 解冻定金
- </div>
- <!-- 平仓 -->
- <div
- v-if="
- scope.row.openPosition > 0 &&
- scope.row.procurementPlanType != '现货'
- "
- class="record"
- @click="cloaeposition1(scope.row)"
- v-hasPermission="
- `procurement.procurementOrder.close`
- "
- >
- 平仓
- </div>
- <div
- v-if="
- (scope.row.status == '已通过' || scope.row.status == '已成交') &&
- scope.row.procurementPlanType != '现货'
- "
- class="record"
- @click="handle(scope.row)"
- v-hasPermission="
- `procurement.procurementOrder.complete`
- "
- >
- 完成
- </div>
- <!-- </div> -->
- <!-- 审核 -->
- <!-- "(scope.row.status == '已通过' || scope.row.status == '已成交') && scope.row.procurementPlanType != '现货'" -->
- <div
- v-if="scope.row.status == '待审核'&&scope.row.taskId!=null"
- type="text"
- class="record"
- @click="aduit(scope.row)"
- v-hasPermission="
- `procurement.procurementOrder.view`
- "
- >
- 审核
- </div>
- <div
- v-if="scope.row.status == '待审核'"
- class="record"
- @click="deletehandle(scope.row)"
- v-hasPermission="
- `procurement.procurementOrder.delete`
- "
- >
- 删除
- </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="25%"
- 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="dealDate"
- :label-width="formLabelWidth"
- class="deal"
- >
- <el-date-picker
- v-model="clinchdeal1.dealDate"
- type="date"
- placeholder="请选择成交日期"
- value-format="yyyy-MM-dd"
- class="chengjiaoriqi"
- />
- </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="40%"
- 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"
- @change='transaction'
- >
- <ws-option
- v-for="item in transactionRecordList1"
- :key="item.constKey"
- :label="item.key"
- :value="item.key"
- />
- </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
- @input="closingPositionPayable"
- v-model="closePositionList1.closingQuantity"
- autocomplete="off"
- placeholder="请输入平仓数量"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="平仓价格(元/吨)" prop="closeRate">
- <el-input
- @input="closingPositionPayable"
- v-model="closePositionList1.closeRate"
- autocomplete="off"
- placeholder="请输入平仓价格"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="平仓基差(元/吨)" prop="closingBasis">
- <el-input
- @input="closingPositionPayable"
- v-model="closePositionList1.closingBasis"
- autocomplete="off"
- placeholder="请输入平仓基差"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="平仓应付(元)" prop="closingPositionPayable">
- <el-input
- readonly="readonly"
- 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"
- class="pingcangriqi"
- />
- </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="40%"
- title="审核"
- :visible.sync="dialogFormVisible4"
- :append-to-body="true"
- >
- <el-form>
- <el-form-item label="交易类型" :label-width="formLabelWidth">
- <span>采购</span>
- </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 v-if='aduitlist.procurementPlanType=="期货"' label="基差(元/吨)" :label-width="formLabelWidth">
- <el-input
- v-model="aduitlist.basis"
- autocomplete="off"
- placeholder="请输入基差"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item v-if='aduitlist.procurementPlanType=="期货"' label="发票费用(元/吨)" :label-width="formLabelWidth">
- <el-input
- v-model="aduitlist.invoiceFee"
- autocomplete="off"
- placeholder="请输入发票费用"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item v-if='aduitlist.procurementPlanType=="期货"' 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">
- <el-select
- v-model="aduitlist.contractNo"
- placeholder="请选择合同编号"
- class="deal"
- filterable
-
- >
- <el-option
- v-for="item in options"
- :key="item.constKey"
- :label="item.contractNo"
- :value="item.contractNo"
- />
- </el-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">
- <div v-if="customerlist.customerTypeFlag == '2'">
- <h4>营业执照</h4>
- <img width="50%" :src="customerlist.businessLicenseAddressUrl" alt />
- <el-form-item label="公司名称" :label-width="formLabelWidth">
- {{ customerlist.compName }}
- </el-form-item>
- <el-form-item label="纳税人识别号" :label-width="formLabelWidth">
- {{ customerlist.payTaxesCard }}
- </el-form-item>
- </div>
- <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"
- v-if="customerlist.customerTypeFlag == '1'"
- >
- {{ customerlist.payeeName }}
- </el-form-item>
- <el-form-item
- label="收款人身份证号"
- :label-width="formLabelWidth"
- v-if="customerlist.customerTypeFlag == '1'"
- >
- {{ customerlist.payeeNumberCard }}
- </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="cancel">取 消</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="closingPrice" 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 }}
- </div>
- <div class="price">
- {{ item.price }}
- </div>
- <div>{{ item.updateDate }}</div>
- </div>
- </el-dialog>
- </div>
- <!-- </div> -->
- </template>
- <script>
- import { packList } from '@/model/contarct/index'
- import {
- detailsList,
- chengList,
- getTransactionPriceList,
- closePositionList,
- aduitpurchase,
- aduitcontractno,
- editStatus,
- deletepurchase,
- postsubmit,
- posthandle
- } from '@/model/purchasingManagement/index'
- import { downloadFile } from '@/utils/batchDown'
- import Pagination from '@/components/Pagination'
- import WsUpload from '@/components/WsUpload'
- 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: '',
- options:[],
- deptBudgetTotal: 0,
- currentPage: 1,
- tranTypeKey: 1,
- pageSize: 10,
- searchType: '',
- searchTypeText: '全部订单',
- procurementPlanType: '',
- searchKeyWord: '',
- contractType: 2,
- enter: {
- closePositionList: [],
- },
- taskTypeList: [
- { value: '待审核', type: 1 },
- { value: '执行中', type: 2 },
- { value: '已完成', type: 3 },
- { value: '全部订单', type: '' },
- ],
- // 提交类型
- submitType: true,
- size: 10,
- spanArr: [],
- contractNo: '',
- customerlist: {},
- packingTypeList: [],
- inOutTaskNo: '',
- compId: localStorage.getItem('ws-pf_compId'),
- deptCircularPage: {},
- warehouseList: [],
- deptBudgetList: {},
- pcFlag: 1,
- invoiceList: [],
- contractNoList: [],
- pricechange: [],
- aduitlist: {
- unloadingCharge: 0,
- basis: 0,
- },
- basis: 0,
- replenishlist: {},
- closePositionList1: {},
- transactionRecordList1: [],
- transactionRecordList: {},
- closePositionList: [],
- historyList: [],
- openPositionTmp:0,
- pickerBeginDateBefore: {
- disabledDate: (time) => {
- return time.getTime() > Date.now()
- },
- },
- accessoryTFs: false,
- }
- },
- activated() {
- // this.loaddata()
- this.getList()
- this.showType = this.isShow
- },
- methods: {
- handletest(){
- postsubmit({ id: 'b1df1547e79e4d4aaa92b4ce8793d0a1'})
- .toPromise()
- .then((response) => {
- console.log(111)
- })
- .catch((req) => {
- })
- },
- transaction(e){
- for (let i = 0; i < this.transactionRecordList1.length; i++) {
- if(this.transactionRecordList1[i].key==e){
- if(this.openPositionTmp>this.transactionRecordList1[i].value){
- this.closePositionList1.openPosition=this.transactionRecordList1[i].value
- }
- else{
- this.closePositionList1.openPosition = this.openPositionTmp
- }
- }
- }
- },
- cancel() {
- this.dialogFormVisible8 = false
- this.customerlist.cardAddressUrl1 = ''
- this.customerlist.cardAddressUrl2 = ''
- this.customerlist.customerName = ''
- this.customerlist.customerNumberCard = ''
- this.customerlist.payeeAddressUrl1 = ''
- this.customerlist.payeeAddressUrl2 = ''
- this.customerlist.bankCard = ''
- this.customerlist.bankDeposit = ''
- this.customerlist.bankDepositBranch = ''
- this.customerlist.payeeName = ''
- this.customerlist.payeeName = ''
- this.customerlist.payeeNumberCard = ''
- this.customerlist.customerPhone = ''
- this.customerlist.compAddress = ''
- this.customerlist.businessLicenseAddressUrl = ''
- this.customerlist.compName = ''
- this.customerlist.payTaxesCard = ''
- },
- dataFilter(val) {
- // console.log(val,"名")
- this.aduitlist.contractNo = val
- if (val) {
- //val存在
- this.options = this.contractNoList.filter(item => {
- if (
- !!~item.contractNo.indexOf(val) ||
- !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
- ) {
- return true
- }
- })
- } else {
- //val为空时,还原数组
- this.options =this.contractNoList
- }
- },
- //修改基差
- varietyClick(row) {
- if (row.basis) {
- if (isNaN(row.basis)) {
- this.$message({
- message: '基差非数字!',
- type: 'warning',
- })
- return
- }
- }
- if (
- (row.basis&&
- String(row.basis).indexOf('.') != -1 &&
- String(row.basis).length -
- (String(row.basis).indexOf('.') + 1) >
- 2) ||
- row.basis > 100000 ||
- row.basis < -100000
- ) {
- this.$message({
- message: '基差输入错误',
- type: 'warning',
- })
- return
- }
- if (!String(row.basis)) {
- this.$message({
- message: '基差不能为空!',
- type: 'warning',
- })
- return
- }
- this.$confirm(`确定要修改基差?`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- editStatus({
- flag: 3,
- // basis: '-'+Math.abs(row.basis),
- basis: row.basis,
- id: row.id,
- })
- .toPromise()
- .then((response) => {
- this.$notify.success({
- title: '成功',
- message: '修改成功',
- })
- this.getList()
- })
- .catch((response) => {})
- })
- .catch(() => {
- return false
- })
- },
- whether(row) {
- row.identification = 'true'
- },
- nocomplete1(row) {
- this.$router.push({
- name: 'purchaseReceiptStatisticsList',
- query: {
- compId: localStorage.getItem('ws-pf_compId'),
- currentPage: this.currentPage,
- pageSize: this.pageSize
- },
- })
- },
- nocomplete(row) {
- this.$router.push({
- name: 'purchaseClosingCashierList',
- query: {
- compId: localStorage.getItem('ws-pf_compId'),
- currentPage: this.currentPage,
- pageSize: this.pageSize
- },
- })
- },
- 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('删除订单失败')
- })
- })
- },
- //修改基差
- changebasis(item) {
- editStatus({ basis: this.basis, id: item.id, flag: 3 })
- .toPromise()
- .then((response) => {
- this.$message.success('修改基差成功')
- this.getList()
- })
- .catch((req) => {
- this.$message.success('修改基差失败')
- })
- },
- editbasis(item) {
- this.basis = item.basis
- item.basischange = true
- },
- closepositionconfirm() {
- this.closePositionList1.compId = localStorage.getItem('ws-pf_compId')
- if (!this.closePositionList1.transactionPrice) {
- this.$message({
- message: '成交价不能为空!',
- type: 'warning',
- })
- return
- }
- if (!this.closePositionList1.closingQuantity) {
- this.$message({
- message: '平仓数量不能为空!',
- type: 'warning',
- })
- return
- }
- if (
- (this.closePositionList1.closingQuantity &&
- String(this.closePositionList1.closingQuantity).indexOf('.') != -1 &&
- String(this.closePositionList1.closingQuantity).length -
- (String(this.closePositionList1.closingQuantity).indexOf('.') + 1) >
- 2) ||
- this.closePositionList1.closingQuantity >
- this.closePositionList1.openPosition ||
- this.closePositionList1.closingQuantity < 1
- ) {
- this.$message({
- message: '平仓数量超出上限',
- type: 'warning',
- })
- return
- }
- if (!this.closePositionList1.closeRate) {
- this.$message({
- message: '平仓价格不能为空!',
- type: 'warning',
- })
- return
- }
- if (
- (this.closePositionList1.closeRate &&
- String(this.closePositionList1.closeRate).indexOf('.') != -1 &&
- String(this.closePositionList1.closeRate).length -
- (String(this.closePositionList1.closeRate).indexOf('.') + 1) >
- 2) ||
- this.closePositionList1.closeRate > 100000 ||
- this.closePositionList1.closeRate < 0
- ) {
- this.$message({
- message: '平仓价格输入错误',
- type: 'warning',
- })
- return
- }
- if (!String(this.closePositionList1.closingBasis)) {
- this.$message({
- message: '平仓基差不能为空!',
- type: 'warning',
- })
- return
- }
- // if (
- // (this.closePositionList1.closingBasis &&
- // String(this.closePositionList1.closingBasis).indexOf('.') != -1 &&
- // String(this.closePositionList1.closingBasis).length -
- // (String(this.closePositionList1.closingBasis).indexOf('.') + 1) >
- // 2) ||
- // this.closePositionList1.closingBasis > 10000 ||
- // this.closePositionList1.closingBasis < 1
- // ) {
- // this.$message({
- // message: '平仓基差输入错误',
- // type: 'warning',
- // })
- // return
- // }
- if (!this.closePositionList1.closePositionDate) {
- this.$message({
- message: '平仓日期不能为空!',
- type: 'warning',
- })
- return
- }
- // this.closePositionList1.closingBasis='-'+Math.abs(this.closePositionList1.closingBasis)
- closePositionList(this.closePositionList1)
- .toPromise()
- .then((response) => {
- this.$message.success('平仓成功')
- this.closePositionList1 = {}
- this.dialogFormVisible2 = false
- this.getList()
- })
- .catch((req) => {
- this.$message.warning('平仓失败')
- })
- },
- //计算平仓应付
- closingPositionPayable() {
- if(this.closePositionList1.transactionPrice
- && this.closePositionList1.closeRate && this.closePositionList1.closingBasis && this.closePositionList1.closingQuantity)
- {
- // this.closePositionList1.closingPositionPayable =
- // (this.closePositionList1.transactionPrice -
- // this.closePositionList1.closeRate-
- // Math.abs(this.closePositionList1.closingBasis)) *
- // this.closePositionList1.closingQuantity
- this.closePositionList1.closingPositionPayable =
- (this.closePositionList1.transactionPrice -
- this.closePositionList1.closeRate+
- this.closePositionList1.closingBasis) *
- this.closePositionList1.closingQuantity
- }
- },
- cloaeposition1(item) {
- this.dialogFormVisible2 = true
- this.openPositionTmp = item.openPosition
- this.$set(this.closePositionList1, 'id', item.id)
- 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)
- getTransactionPriceList({
- id: item.id,
- })
- .toPromise()
- .then((response) => {
- this.transactionRecordList1 = response
- })
- },
- 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('解冻定金失败')
- })
- })
- },
- 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.taskId=item.taskId
- 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)
- this.$set(this.aduitlist, 'procurementPlanType', item.procurementPlanType)
- this.$set(this.aduitlist, 'unitPrice', item.unitPrice)
- this.$set(this.aduitlist, 'invoiceFee', item.invoiceFee)
- // this.$set(this.aduitlist, 'basis', Math.abs(item.basis))
- this.$set(this.aduitlist, 'basis', item.basis)
- this.$set(this.aduitlist, 'depositRatio', item.customerInfo.depositRatio)
- this.$set(this.aduitlist, 'totalDeposit', item.customerInfo.totalDeposit)
- this.$set(this.aduitlist, 'baggingNotes', item.baggingNotes)
- },
- aduitconfirm() {
- if (!this.aduitlist.unitPrice) {
- this.$message({
- message: '单价不能为空!',
- type: 'warning',
- })
- return
- }
- if (
- !String(this.aduitlist.basis) &&
- this.aduitlist.procurementPlanType != '现货'
- ) {
- 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.procurementPlanType != '现货'){
- if (
- (!this.aduitlist.basis &&
- String(this.aduitlist.basis).indexOf('.') != -1 &&
- String(this.aduitlist.basis).length -
- (String(this.aduitlist.basis).indexOf('.') + 1) >
- 2) ||
- this.aduitlist.basis > 10000 ||
- this.aduitlist.basis < 0
- ) {
- this.$message({
- message: '基差输入错误',
- type: 'warning',
- })
- return
- }
- if (
- (!this.aduitlist.unloadingCharge &&
- String(this.aduitlist.unloadingCharge).indexOf('.') != -1 &&
- String(this.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.procurementPlanType = this.aduitlist.procurementPlanType
- if (this.aduitlist.procurementPlanType == '期货') {
- this.aduitlist.freezingDeposit = this.aduitlist.transactionsNumber*this.aduitlist.depositRatio
- // if(this.aduitlist.invoiceFee){
- // this.aduitlist.invoiceFee=-Math.abs(this.aduitlist.invoiceFee)
- // }
- }
- this.dialogFormVisible4 = false
- this.$confirm(`审核通过后,将通知客户订单生效,是否确定通过审核?`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- }).then(() => {
- aduitpurchase(this.aduitlist)
- .toPromise()
- .then((response) => {
- posthandle({ taskId: this.aduitlist.taskId,
- approved: true,
- auditMind: '34',
- needReapply: false,})
- .toPromise()
- .then((response) => {
- this.$message.success('审核成功')
- this.aduitlist = {}
- this.getList()
- })
- })
- })
- },
- Changepricerecord(item) {
- this.dialogFormVisible5 = true
- this.pricechange = item.priceChangeRecordList
- },
- closedPositionLook(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
- }
- if (
- (this.clinchdeal1.transactionPrice &&
- String(this.clinchdeal1.transactionPrice).indexOf('.') != -1 &&
- String(this.clinchdeal1.transactionPrice).length -
- (String(this.clinchdeal1.transactionPrice).indexOf('.') + 1) >
- 2) ||
- this.clinchdeal1.transactionPrice > 100000 ||
- this.clinchdeal1.transactionPrice < 0
- ) {
- this.$message({
- message: '成交价输入错误',
- type: 'warning',
- })
- return
- }
- if (!this.clinchdeal1.turnover) {
- this.$message({
- message: '成交量不能为空',
- type: 'warning',
- })
- return
- }
- if (
- (this.clinchdeal1.turnover &&
- String(this.clinchdeal1.turnover).indexOf('.') != -1 &&
- String(this.clinchdeal1.turnover).length -
- (String(this.clinchdeal1.turnover).indexOf('.') + 1) >
- 2) ||
- this.clinchdeal1.turnover > 1000000 ||
- this.clinchdeal1.turnover < 1
- ) {
- this.$message({
- message: '成交量输入错误',
- type: 'warning',
- })
- return
- }
- if (!String(this.clinchdeal1.basis)) {
- this.$message({
- message: '基差不能为空',
- type: 'warning',
- })
- return
- }
- if (
- (this.clinchdeal1.basis &&
- String(this.clinchdeal1.basis).indexOf('.') != -1 &&
- String(this.clinchdeal1.basis).length -
- (String(this.clinchdeal1.basis).indexOf('.') + 1) >
- 2) ||
- this.clinchdeal1.basis > 10000 ||
- this.clinchdeal1.basis < 0
- ) {
- this.$message({
- message: '基差输入错误',
- type: 'warning',
- })
- return
- }
- if (!this.clinchdeal1.dealDate) {
- 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: localStorage.getItem('ws-pf_compId'),
- // basis:'-'+Math.abs(this.clinchdeal1.basis)
- basis:this.clinchdeal1.basis
- })
- .toPromise()
- .then((response) => {
- this.$message.success('成交成功')
- this.dialogFormVisible1 = false
- this.clinchdeal1 = {}
- this.getList()
- })
- .catch(() => {
- return false
- })
- })
- },
- selectpackingType(e) {
- for (var i = 0; i < this.packingTypeList.length; i++) {
- if (this.packingTypeList[i].constValue == e) {
- this.aduitlist.packingTypeKey = this.packingTypeList[i].constKey
- }
- }
- },
- selectType(e) {
- for (var i = 0; i < this.invoiceList.length; i++) {
- if (this.invoiceList[i].constValue == e) {
- this.aduitlist.typeKey = this.invoiceList[i].constKey
- }
- }
- },
- getList() {
- detailsList({
- compId: localStorage.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].identification = 'false'
- response.records[i].openPosition =
- response.records[i].cumulativeTurnover -
- response.records[i].closedPosition -
- response.records[i].stockInQuantity
- response.records[i].shouldFreeze =
- response.records[i].depositRatio * response.records[i].transactionsNumber
- }
- 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: localStorage.getItem('ws-pf_compId'),
- flag: 3,
- })
- .toPromise()
- .then((response) => {
- this.contractNoList = response
- this.options=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
- }
- }
- })
- },
- //查看计划
- lookPlan(row) {
- this.$router.push({
- path: 'procurementPlanLook',
- query: {
- id: row.planId,
- },
- })
- },
- //查看合同
- lookContract(row) {
- if(row.goodsType==1){
- this.$router.push({
- name: 'purchaseContractExamine',
- query: {
- id: row.contractId,
- },
- })
- }
- else{
- this.$router.push({
- name: 'futuresPurchaseContractExamine',
- query: {
- id: row.contractId,
- },
- })
- }
- },
- //返回
- 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()
- },
- selecttaskType(e) {
- for (var i = 0; i < this.taskTypeList.length; i++) {
- if (this.taskTypeList[i].value == e) {
- this.searchType = this.taskTypeList[i].type
- }
- }
- },
- handleExamine(row) {
- this.$router.push({
- name: 'salesContractExamine',
- query: { id: row.id },
- })
- },
- // 关闭 dialog时 处理文件url 初始化upload组件
- handleCloe() {
- this.dialogViewSpareMoney = false
- },
- //查找
- find() {
- this.currentPage = 1
- this.getList()
- },
- async exportlist() {
- const { data } = await export1(
- {
- compId: localStorage.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 .findinput input {
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0px;
- }
- /deep/.base_header_layout .grid-content.right .find.el-button--primary {
- width: 30px;
- margin: 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{
- padding:10px;
- }
- .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%;
- overflow: auto;
- 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: 66%;
- }
- .photo {
- padding: 0% 34%;
- }
- .pingcangriqi {
- width: 66% !important;
- }
- .chengjiaoriqi {
- width: 117% !important;
- }
- .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/.typeselect{
- margin-right:10px;
- }
- /deep/.typeselect .el-input__inner {
- color: #8890b1;
- }
- .inputChenge {
- width: 40%;
- display: inline-flex;
- }
- .price {
- margin-left: 97px;
- margin-top: -19px;
- }
- .chenglu {
- font-size: 14px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #8890b1;
- line-height: 20px;
- }
- </style>
|