12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132 |
- //销售订单
- <template>
- <div class="container">
- <BaseHeaderLayout :leftSpan="15">
- <template slot="left"> </template>
- <template slot="right">
- <ws-select
- v-model="searchTypeText"
- placeholder=""
- class="typeselect"
- @change="selectExamineType"
- :value="searchType"
- >
- <ws-option
- v-for="item in searchTypeList"
- :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: -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="salePlan"
- label="销售计划"
- width="130"
- >
- <template slot-scope="scope">
- <div class="record"
- @click="lookPlan(scope.row)">{{ scope.row.salePlan}}</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.salePlanType == '期货'"
- @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.salePlanType == '现货'">--</span>
- <span
- v-if="
- !scope.row.basischange &&
- String(scope.row.basis) &&
- scope.row.salePlanType == '期货' &&
- String(scope.row.basis)>0
-
- "
- >{{ '+'+scope.row.basis }}</span
- >
- <span
- v-else-if="
- !scope.row.basischange &&
- String(scope.row.basis) &&
- scope.row.salePlanType == '期货' &&
- String(scope.row.basis)<=0
-
- "
- >{{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 && scope.row.salePlanType == '期货'"
- class="iconfont icon-dui"
- ></i>
- <img
- v-if="
- !scope.row.basischange &&
- String(scope.row.basis) &&
- scope.row.salePlanType == '期货'
- "
- 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="!String(scope.row.basis)">-</span>
- </template>
- </el-table-column>
- <el-table-column
- class="table_td"
- prop="freezingDeposit"
- label="冻结定金(元)"
- width="90"
- ><template slot-scope="scope">
- <span v-if="scope.row.salePlanType == '现货'">--</span>
- <span v-if="scope.row.salePlanType == '期货'">{{
- 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.salePlanType == '现货'">--</span>
- <span v-if="scope.row.salePlanType == '期货'">{{
- 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.salePlanType == '现货'">--</span>
- <span v-if="scope.row.salePlanType == '期货'">{{
- 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.salePlanType == '现货'">--</span>
- <span v-if="scope.row.salePlanType == '期货'">{{
- 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="stockOutQuantity"
- label="已出库量(吨)"
- width="90"
- ><template slot-scope="scope">
- <span v-if="scope.row.salePlanType == '现货'">--</span>
- <span v-if="scope.row.salePlanType == '期货'">{{
- scope.row.stockOutQuantity
- }}</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.salePlanType == '现货'">--</span>
- <span v-if="scope.row.salePlanType == '期货'">{{
- 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.salePlanType == '现货'">--</span>
- <span v-if="scope.row.salePlanType == '期货'">{{
- scope.row.closedPosition
- }}</span>
- <i
- v-if="scope.row.salePlanType == '期货'"
- @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">
- <span v-if="scope.row.salePlanType == '现货'">--</span>
- <span v-if="scope.row.salePlanType == '期货'">{{
- scope.row.cumulativeTurnover
- }}</span>
- <i
- v-if="scope.row.salePlanType == '期货'"
- @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
- placement="top"
- :width="160"
- trigger="hover"
- visible-arrow="false"
- >
- <template>
- <span slot="reference">
- {{ scope.row.packingType }}
- </span>
- </template>
- <div>
- <span
- v-if="scope.row.packingType != '散装'"
- style="margin-left: 6px"
- >{{ scope.row.baggingNotes }}</span
- >
- </div>
- </el-popover>
- </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=""
- width="130"
- >
- <template slot-scope="scope" >
- <div
- style='display: inline-block;
- color: #5878e8;
- padding: 0 4px !important;
- position: relative;
- font-size: 14px;'
- @click="nocomplete1(scope.row)"
- v-if="scope.row.procurementPlanType != '现货'&&scope.row.deliveryUnpaid != null&&scope.row.deliveryUnpaid >0">去结算</div>
- <div
- style='display: inline-block;
- color: #5878e8;
- padding: 0 4px !important;
- position: relative;
- font-size: 14px;'
- @click="nocomplete1(scope.row)"
- v-else-if="scope.row.procurementPlanType != '现货'&&scope.row.deliveryUnpaid != null&&scope.row.deliveryUnpaid==0">已结算</div>
- <div v-else>--</div>
- </template></el-table-column>
- <el-table-column
- class="table_td"
- label="平仓结算"
- prop=""
- width="130"
- >
- <template slot-scope="scope">
- <div
- style='display: inline-block;
- color: #5878e8;
- padding: 0 4px !important;
- position: relative;
- font-size: 14px;'
- @click="nocomplete(scope.row)"
- v-if="scope.row.procurementPlanType != '现货'&&scope.row.closedUnpaid != null&&scope.row.closedUnpaid >0">去结算</div>
- <div
- style='display: inline-block;
- color: #5878e8;
- padding: 0 4px !important;
- position: relative;
- font-size: 14px;'
- @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="360">
- <template slot-scope="scope">
- <!---成交-->
- <div
- v-if="
- (scope.row.status == '已通过' || scope.row.status == '已成交') &&
- scope.row.salePlanType == '期货'
- "
- class="record"
- v-hasPermission="
- `sale.saleOrder.deal`
- "
- @click="makeabargain(scope.row)"
- >
- 成交
- </div>
- <!-- 补充定金 -->
- <div
- v-if="
- scope.row.defaultDeposit > 0 && scope.row.salePlanType == '期货'
- "
- class="record"
- v-hasPermission="
- `sale.saleOrder.deposit`
- "
- @click="addthedeposit(scope.row)"
- >
- 补充定金
- </div>
- <!--解冻定金-->
- <div
- v-if="
- scope.row.freezingDeposit > 0 && scope.row.salePlanType == '期货'
- "
- class="record"
- v-hasPermission="
- `sale.saleOrder.thaw`
- "
- @click="unfreeze(scope.row)"
- >
- 解冻定金
- </div>
- <!-- 平仓 -->
- <div
- v-if="
- scope.row.openPosition > 0 && scope.row.salePlanType == '期货'
- "
- class="record"
- v-hasPermission="
- `sale.saleOrder.close`
- "
- @click="cloaeposition1(scope.row)"
- >
- 平仓
- </div>
- <!--完成-->
- <div
- v-if="
- (scope.row.status == '已通过' || scope.row.status == '已成交') &&
- scope.row.salePlanType == '期货'
- "
- class="record"
- v-hasPermission="
- `sale.saleOrder.complete`
- "
- @click="handle(scope.row)"
- >
- 完成
- </div>
- <!-- 审核 -->
- <div
- v-if="scope.row.status == '待审核'&&scope.row.taskId!=null"
- type="text"
- class="record"
- v-hasPermission="
- `sale.saleOrder.view`
- "
- @click="aduit(scope.row)"
- >
- 审核
- </div>
- <!--删除-->
- <div
- v-if="scope.row.status == '待审核'"
- class="record"
- v-hasPermission="
- `sale.saleOrder.delete`
- "
- @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="40%"
- title="补充定金"
- :visible.sync="dialogFormVisible3"
- :append-to-body="true"
- >
- <el-form :model="form">
- <h5>{{ 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"
- placeholder="请输入成交价"
- >
- <ws-option
- v-for="item in transactionRecordList"
- :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
- 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
- @input="yingfu"
- v-model="closePositionList1.closingBasis"
- autocomplete="off"
- placeholder="请输入平仓基差"
- class="deal"
- ></el-input>
- </el-form-item>
- <el-form-item label="平仓应付(元)" prop="closingPositionPayable">
- <el-input
- v-model="closePositionList1.closingPositionPayable"
- readonly="readonly"
- 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="40%"
- title="审核"
- :visible.sync="dialogFormVisible4"
- :append-to-body="true"
- >
- <el-form>
- <el-form-item label="交易类型" :label-width="formLabelWidth">
- 销售
- </el-form-item>
- <el-form-item label="交易目标" :label-width="formLabelWidth">
- {{ aduitlist.tradingTarget }}
- </el-form-item>
- <el-form-item label="买方" :label-width="formLabelWidth">
- {{ aduitlist.buyer }}
- </el-form-item>
- <el-form-item label="买方电话" :label-width="formLabelWidth">
- {{ aduitlist.buyerPhone }}
- </el-form-item>
- <el-form-item label="交易数量(吨)" :label-width="formLabelWidth">
- {{ aduitlist.transactionsNumber }}
- </el-form-item>
- <el-form-item label="提交时间" :label-width="formLabelWidth">
- {{ aduitlist.submitDate }}
- </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.salePlanType == '期货'"
- label="基差(元/吨)"
- :label-width="formLabelWidth"
- v
- >
- <el-input
- v-model="aduitlist.basis"
- autocomplete="off"
- placeholder="请输入基差"
- class="deal"
- ></el-input>
- </el-form-item>
- <!-- <el-form-item
- v-if="aduitlist.salePlanType == '期货'"
- label="卸车费(元/吨)"
- :label-width="formLabelWidth"
- >
- <el-input
- v-model="aduitlist.unloadingCharge"
- autocomplete="off"
- placeholder="请输入卸车费"
- class="deal"
- ></el-input>
- </el-form-item> -->
- <el-form-item
- v-if="aduitlist.salePlanType == '期货'"
- 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-select
- v-model="aduitlist.contractNo"
- placeholder="请选择合同编号"
- class="deal"
- filterable
- :filter-method="dataFilter"
- >
- <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">
- <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"
- >
- {{ customerlist.compName }}
- </el-form-item>
- <el-form-item
- v-if="customerlist.customerTypeFlag != 1"
- label="纳税人识别号"
- :label-width="formLabelWidth"
- >
- {{ customerlist.payTaxesCard }}
- </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"
- 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"
- v-if="customerlist.customerTypeFlag != 1"
- >
- {{ customerlist.compAddress }}
- </el-form-item>
- <el-form-item
- label="联系地址"
- :label-width="formLabelWidth"
- v-if="customerlist.customerTypeFlag == 1"
- >
- {{ 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="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,
- closePositionList,
- aduitsale,
- aduitcontractno,
- editStatus,
- deletesale,
- getsalepricelist,
- } from '@/model/salesManagement/index'
- import {
- posthandle
- } 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: 0,
- submissionDate: '',
- // delivery: false,
- // type: [],
- // resource: '',
- // desc: ''
- },
- formLabelWidth: '120px',
- basischange: false,
- clinchdeal: {},
- clinchdeal1: {},
- barWidth: 0,
- barHeight: 0,
- retioX: 1,
- ratioY: 1,
- isTaped: false,
- isHover: false,
- isShow: !this.autohide,
- //弹出框
- dialogViewSpareMoney: false,
- dialogApproveFormVisible: false,
- // 船舶类型
- monetaryKey: null,
- // 表格显示数据
- tableDate: [],
- // 是否显示
- showType: true,
- // 年
- year: '',
- pickerOptions: {},
- value2: '',
- deptBudgetTotal: 0,
- currentPage: 1,
- tranTypeKey: 1,
- pageSize: 10,
- searchType: '',
- searchTypeText: '全部订单',
- searchKeyWord: '',
- contractType: 1,
- enter: {
- closePositionList: [],
- },
- transactionRecordList: [],
- // taskTypeList:[
- // {value:'待审核',type:1},
- // {value:'已完成',type:2},
- // {value:'已通过',type:3},
- // {value:'已成交',type:4},
- // ],
- // 提交类型
- submitType: true,
- size: 10,
- spanArr: [],
- // contractNo: '',
- customerlist: {},
- packingTypeList: [],
- inOutTaskNo: '',
- compId: sessionStorage.getItem('ws-pf_compId'),
- deptCircularPage: {},
- warehouseList: [],
- deptBudgetList: {},
- transactionRecordList: {},
- pcFlag: 1,
- invoiceList: [],
- contractNoList: [],
- options:[],
- pricechange: [],
- searchTypeList: [
- { value: '待审核', type: 1 },
- { value: '执行中', type: 2 },
- { value: '已完成', type: 3 },
- { value: '全部订单', type: '' },
- ],
- aduitlist: {},
- basis: 0,
- replenishlist: {},
- closePositionList1: {},
- closePositionList: [],
- historyList: [],
- pickerBeginDateBefore: {
- disabledDate: (time) => {
- return time.getTime() > Date.now()
- },
- },
- accessoryTFs: false,
- }
- },
- activated() {
- // this.loaddata()
- this.getList()
- this.showType = this.isShow
- },
- methods: {
- //查找
- find() {
- this.currentPage = 1
- this.getList()
- },
- selectExamineType(e) {
- for (var i = 0; i < this.searchTypeList.length; i++) {
- if (this.searchTypeList[i].value == e) {
- this.searchType = this.searchTypeList[i].type
- }
- }
- },
- nocomplete1(row) {
- this.$router.push({
- name: 'salesDeliveryReportList',
- query: {
- compId: sessionStorage.getItem('ws-pf_compId'),
- currentPage: this.currentPage,
- pageSize: this.pageSize
- },
- })
- },
- nocomplete(row) {
- this.$router.push({
- name: 'salesClosingCashierList',
- query: {
- compId: sessionStorage.getItem('ws-pf_compId'),
- currentPage: this.currentPage,
- pageSize: this.pageSize
- },
- })
- },
- //查看计划
- lookPlan(row) {
- this.$router.push({
- path: 'salesPlanLook',
- query: {
- id: row.planId,
- },
- })
- },
- //查看合同
- lookContract(row) {
- if(row.goodsType==1){
- this.$router.push({
- name: 'salesContractExamine',
- query: {
- id: row.contractId,
- },
- })
- }
- else{
- this.$router.push({
- name: 'futuresSalesContractExamine',
- query: {
- id: row.contractId,
- },
- })
- }
- },
- 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
- }
- },
- //完成
- 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.contractNo = item.contractNo
- this.clinchdeal.goodsName = item.goodsName
- this.clinchdeal.planId = item.planId
- this.clinchdeal.buyer = item.buyer
- this.clinchdeal.commonId = item.commonId
- },
- //成交
- 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,
- compId: sessionStorage.getItem('ws-pf_compId'),
- contractNo: this.clinchdeal.contractNo,
- planId: this.clinchdeal.planId,
- goodsName: this.clinchdeal.goodsName,
- buyer: this.clinchdeal.buyer,
- commonId: this.clinchdeal.commonId,
- })
- .toPromise()
- .then((response) => {
- this.$message.success('成交成功')
- this.dialogFormVisible1 = false
- this.getList()
- })
- .catch(() => {
- return false
- })
- })
- },
- //删除
- deletehandle(item) {
- this.$confirm(`销售订单删除后不可恢复,是否确定删除?`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- }).then(() => {
- deletesale({ id: item.id })
- .toPromise()
- .then((response) => {
- this.$message.success('删除订单成功')
- this.getList()
- })
- .catch((req) => {
- this.$message.success('删除订单失败')
- })
- })
- },
- //平仓
- closepositionconfirm() {
- 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 < 0
- ) {
- this.$message({
- message: '平仓基差输入错误',
- type: 'warning',
- })
- return
- }
- if (!this.closePositionList1.closePositionDate) {
- this.$message({
- message: '平仓日期不能为空!',
- type: 'warning',
- })
- return
- }
- this.closePositionList1.compId = sessionStorage.getItem('ws-pf_compId')
- closePositionList(this.closePositionList1)
- .toPromise()
- .then((response) => {
- this.$message.success('平仓成功')
- this.closePositionList1 = {}
- this.dialogFormVisible2 = false
- 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)
- getsalepricelist({
- id: item.id,
- })
- .toPromise()
- .then((response) => {
- this.transactionRecordList = response
- })
- },
- yingfu(item) {
- this.closePositionList1.closingPositionPayable =
- (this.closePositionList1.closeRate -
- this.closePositionList1.transactionPrice -
- this.closePositionList1.closingBasis) *
- this.closePositionList1.closingQuantity
- },
- //修改基差
- changebasis(item) {
- // editStatus({ basis: Math.abs(this.basis), id: item.id, flag: 3 })
- editStatus({ basis: this.basis, id: item.id, flag: 3 })
- .toPromise()
- .then((response) => {
- this.$message.success('修改基差成功')
- this.getList()
- })
- .catch((req) => {
- this.$message.warning('修改基差失败')
- })
- },
- editbasis(item) {
- this.basis = item.basis
- item.basischange = true
- },
- //解冻定金
- unfreeze(item) {
- this.$confirm(`确定解冻订单(${item.salePlan})的定金?`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- }).then(() => {
- editStatus({ id: item.id, flag: 1 })
- .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)
- },
- 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('补充失败')
- })
- },
- //审核
- aduit(item) {
- this.dialogFormVisible4 = true
- this.aduitlist.id = item.id
- this.aduitlist.taskId=item.taskId
- this.aduitlist.type = '销售'
- this.$set(this.aduitlist, 'buyer', item.buyer)
- this.$set(this.aduitlist, 'buyerPhone', item.buyerPhone)
- this.$set(this.aduitlist, 'tradingTarget', item.tradingTarget)
- this.$set(this.aduitlist, 'transactionsNumber', item.transactionsNumber)
- this.$set(this.aduitlist, 'submitDate', 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, 'salePlanType', item.salePlanType)
- this.$set(this.aduitlist, 'depositRatio', item.customerInfo.depositRatio)
- this.$set(this.aduitlist, 'totalDeposit', item.customerInfo.totalDeposit)
- this.$set(this.aduitlist, 'unitPrice', item.unitPrice)
- this.$set(this.aduitlist, 'invoiceFee', item.invoiceFee)
- this.$set(this.aduitlist, 'basis', item.basis)
- },
- aduitconfirm() {
- if (!this.aduitlist.unitPrice) {
- this.$message({
- message: '单价不能为空!',
- type: 'warning',
- })
- return
- }
- if ( !String(this.aduitlist.basis) && this.aduitlist.salePlanType == '期货') {
- 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.salePlanType != '现货'){
- if (
- (
- this.aduitlist.basis &&
- String(this.aduitlist.basis).indexOf('.') != -1 &&
- String(aduitlist.basis).length -
- (String(this.aduitlist.basis).indexOf('.') + 1) >
- 2) ||
- (this.aduitlist.salePlanType == '期货' &&
- this.aduitlist.basis > 10000) ||
- (this.aduitlist.salePlanType == '期货' && this.aduitlist.basis < 0)
- ) {
- this.$message({
- message: '基差输入错误',
- type: 'warning',
- })
- return
- }
- if (
- (this.aduitlist.invoiceFee &&
- String(this.aduitlist.invoiceFee).indexOf('.') != -1 &&
- String(aduitlist.invoiceFee).length -
- (String(this.aduitlist.invoiceFee).indexOf('.') + 1) >
- 2) ||
- this.aduitlist.invoiceFee > 1000 ||
- this.aduitlist.invoiceFee < 0
- ) {
- this.$message({
- message: '发票费用输入错误',
- type: 'warning',
- })
- return
- }
- }
- if (this.aduitlist.salePlanType == '期货') {
- this.aduitlist.basis = '+' + this.aduitlist.basis
- }
- this.aduitlist.salePlanType = this.aduitlist.salePlanType
- if (this.aduitlist.salePlanType == '期货') {
- this.aduitlist.freezingDeposit = this.aduitlist.transactionsNumber*this.aduitlist.depositRatio
- }
- this.dialogFormVisible4 = false
- this.$confirm(`审核通过后,将通知客户订单生效,是否确定通过审核?`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- }).then(() => {
- aduitsale(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()
- })
- })
- })
- },
- //客户
- 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]
- }
- },
- //列表
- 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].stockOutQuantity
- }
- 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: 4,
- })
- .toPromise()
- .then((response) => {
- this.contractNolist = response
- this.options=response
- })
- },
- 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
- },
- selectpackingType(e) {
- for (var i = 0; i < this.packingTypeList.length; i++) {
- if (this.packingTypeList[i].constValue == e) {
- this.aduitlist.packingTypeKey = this.packingTypeList[i].constKey
- console.log(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
- }
- }
- },
- 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
- }
- }
- })
- },
- //返回
- 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
- },
- 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>
- // @import '../../../../static/iconfont/iconfont.css';
- .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;
- margin-top: -1px;
- margin-left: -5px;
- }
- /deep/.findValue .el-input__inner {
- border-top-right-radius: 0px;
- width: 385px;
- }
- .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;
- }
- .record:after {
- position: absolute;
- content: '';
- display: block;
- top: 5px;
- right: -2px;
- width: 1px;
- height: 12px;
- background: #e9ecf7;
- }
- // .el-row{
- // height: 150px;
- // }
- .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;
- }
- .record,
- .adjustment {
- display: inline-block;
- color: #5878e8;
- padding: 0 4px !important;
- position: relative;
- font-size: 14px;
- }
- .container {
- overflow: scroll;
- height: 93vh;
- }
- .typeselect{
- margin-right:10px;
- }
- .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: 66%;
- }
- .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;
- }
- .base_header_layout {
- padding: 10px 10px 0;
- background-color: #fff;
- height: 50px;
- }
- .price {
- margin-left: 97px;
- margin-top: -19px;
- }
- </style>
|