salesPlanOrderList.vue 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971
  1. //销售订单
  2. <template>
  3. <div class="container">
  4. <BaseHeaderLayout :leftSpan="15">
  5. <template slot="left"> </template>
  6. <template slot="right">
  7. <span style="width: 70px; display: inline-block; color: #8890b1"
  8. >状态:</span
  9. >
  10. <ws-select
  11. v-model="searchTypeText"
  12. placeholder=""
  13. class="typeselect"
  14. @change="selectExamineType"
  15. :value="searchType"
  16. >
  17. <ws-option
  18. v-for="item in searchTypeList"
  19. :key="item.value"
  20. :label="item.value"
  21. :value="item.value"
  22. style="color: #8890b1"
  23. />
  24. </ws-select>
  25. <ws-input
  26. v-model="searchKeyWord"
  27. placeholder="可按照合同编号和任务编号进行查找"
  28. clearable
  29. maxlength="500"
  30. type="input"
  31. ></ws-input>
  32. <ws-button class="find" type="primary" @click="find()"
  33. ><img
  34. width="16"
  35. height="16"
  36. style="
  37. vertical-align: text-top;
  38. position: relative;
  39. top: 0px;
  40. left: -8px;
  41. "
  42. src="../../../public/img/sousuo.png"
  43. alt=""
  44. /></ws-button>
  45. <!-- </div> -->
  46. </template>
  47. </BaseHeaderLayout>
  48. <el-table
  49. :data="warehouseList.records"
  50. size="small"
  51. element-loading-text="正在查询中。。。"
  52. border
  53. fit
  54. highlight-current-row
  55. height="700"
  56. >
  57. <el-table-column type="index" label="序号" width="50"></el-table-column>
  58. <el-table-column
  59. class="table_td"
  60. prop="contractNo"
  61. label="合同编号"
  62. width="100"
  63. >
  64. </el-table-column>
  65. <el-table-column
  66. class="table_td"
  67. prop="salePlan"
  68. label="销售计划"
  69. width="130"
  70. >
  71. </el-table-column>
  72. <el-table-column class="table_td" prop="customer" label="客户">
  73. <template slot-scope="scope">
  74. <div class="record" @click="customer(scope.row)">
  75. {{ scope.row.customer }}
  76. </div>
  77. </template>
  78. </el-table-column>
  79. <el-table-column
  80. class="table_td"
  81. width="100"
  82. prop="unitPrice"
  83. label="单价(元/吨)"
  84. >
  85. <!--改价记录-->
  86. <template slot-scope="scope">
  87. {{ scope.row.unitPrice }}
  88. <i
  89. v-if="scope.row.salePlanType == '期货'"
  90. @click="Changepricerecord(scope.row)"
  91. class="iconfont icon-lishi"
  92. ></i>
  93. </template>
  94. </el-table-column>
  95. <el-table-column
  96. class="table_td"
  97. width="100"
  98. prop="basis"
  99. label="基差(元/吨)"
  100. >
  101. <template slot-scope="scope">
  102. <span v-if="scope.row.salePlanType == '现货'">--</span>
  103. <span
  104. v-if="
  105. !scope.row.basischange &&
  106. scope.row.basis &&
  107. scope.row.salePlanType == '期货'
  108. "
  109. >{{ scope.row.basis }}</span
  110. >
  111. <input
  112. v-if="scope.row.basischange"
  113. style="width: 60px"
  114. v-model="basis"
  115. type="text"
  116. />
  117. <!--改基差-->
  118. <i
  119. @click="changebasis(scope.row)"
  120. v-if="scope.row.basischange && scope.row.salePlanType == '期货'"
  121. class="iconfont icon-dui"
  122. ></i>
  123. <img
  124. v-if="
  125. !scope.row.basischange &&
  126. scope.row.basis &&
  127. scope.row.salePlanType == '期货'
  128. "
  129. width="17"
  130. height="18"
  131. style="vertical-align: text-top; position: relative; top: -1px"
  132. src="../../../public/img/edit.png"
  133. @click="editbasis(scope.row)"
  134. alt=""
  135. />
  136. <span v-if="!scope.row.basis">-</span>
  137. </template>
  138. </el-table-column>
  139. <el-table-column
  140. class="table_td"
  141. prop="freezingDeposit"
  142. label="冻结定金(元)"
  143. width="90"
  144. ><template slot-scope="scope">
  145. <span v-if="scope.row.salePlanType == '现货'">--</span>
  146. <span v-if="scope.row.salePlanType == '期货'">{{
  147. scope.row.freezingDeposit
  148. }}</span>
  149. </template>
  150. </el-table-column>
  151. <el-table-column
  152. class="table_td"
  153. prop="defaultDeposit"
  154. label="拖欠定金(元)"
  155. width="100"
  156. ><template slot-scope="scope">
  157. <span v-if="scope.row.salePlanType == '现货'">--</span>
  158. <span v-if="scope.row.salePlanType == '期货'">{{
  159. scope.row.defaultDeposit
  160. }}</span>
  161. </template></el-table-column
  162. >
  163. <el-table-column
  164. width="100"
  165. class="table_td"
  166. prop="unloadingCharge"
  167. label="卸车费(元/吨)"
  168. ><template slot-scope="scope">
  169. <span v-if="scope.row.salePlanType == '现货'">--</span>
  170. <span v-if="scope.row.salePlanType == '期货'">{{
  171. scope.row.unloadingCharge
  172. }}</span>
  173. </template></el-table-column
  174. >
  175. <el-table-column
  176. width="100"
  177. class="table_td"
  178. prop="invoiceFee"
  179. label="发票费(元/吨)"
  180. ><template slot-scope="scope">
  181. <span v-if="scope.row.salePlanType == '现货'">--</span>
  182. <span v-if="scope.row.salePlanType == '期货'">{{
  183. scope.row.invoiceFee
  184. }}</span>
  185. </template></el-table-column
  186. >
  187. <el-table-column
  188. class="table_td"
  189. prop="transactionsNumber"
  190. label="合同重量(吨)"
  191. width="100"
  192. ></el-table-column>
  193. <el-table-column
  194. class="table_td"
  195. prop="stockOutQuantity"
  196. label="已出库量(吨)"
  197. width="90"
  198. ><template slot-scope="scope">
  199. <span v-if="scope.row.salePlanType == '现货'">--</span>
  200. <span v-if="scope.row.salePlanType == '期货'">{{
  201. scope.row.stockOutQuantity
  202. }}</span>
  203. </template></el-table-column
  204. >
  205. <el-table-column
  206. class="table_td"
  207. prop="openPosition"
  208. label="可平仓量(吨)"
  209. width="90"
  210. ><template slot-scope="scope">
  211. <span v-if="scope.row.salePlanType == '现货'">--</span>
  212. <span v-if="scope.row.salePlanType == '期货'">{{
  213. scope.row.openPosition
  214. }}</span>
  215. </template></el-table-column
  216. >
  217. <el-table-column
  218. class="table_td"
  219. prop="closedPosition"
  220. label="已平仓量(吨)"
  221. width="90"
  222. >
  223. <!--平仓记录-->
  224. <template slot-scope="scope">
  225. <span v-if="scope.row.salePlanType == '现货'">--</span>
  226. <span v-if="scope.row.salePlanType == '期货'">{{
  227. scope.row.closedPosition
  228. }}</span>
  229. <i
  230. v-if="scope.row.salePlanType == '期货'"
  231. @click="closedPosition(scope.row)"
  232. class="iconfont icon-lishi"
  233. ></i>
  234. </template>
  235. </el-table-column>
  236. <el-table-column
  237. class="table_td"
  238. prop="cumulativeTurnover"
  239. label="已成交量(吨)"
  240. width="90"
  241. >
  242. <!--成交记录-->
  243. <template slot-scope="scope">
  244. <span v-if="scope.row.salePlanType == '现货'">--</span>
  245. <span v-if="scope.row.salePlanType == '期货'">{{
  246. scope.row.cumulativeTurnover
  247. }}</span>
  248. <i
  249. v-if="scope.row.salePlanType == '期货'"
  250. @click="transactionRecord(scope.row)"
  251. class="iconfont icon-lishi"
  252. ></i>
  253. </template>
  254. </el-table-column>
  255. <el-table-column
  256. class="table_td"
  257. label="发票类型"
  258. prop="type"
  259. ></el-table-column>
  260.  <el-table-column prop="packingType" label="包装方式">
  261. <template slot-scope="scope">
  262. <el-popover
  263. placement="top"
  264. :width="160"
  265. trigger="hover"
  266. visible-arrow="false"
  267. >
  268. <template>
  269. <span slot="reference">
  270. {{ scope.row.packingType }}
  271. </span>
  272. </template>
  273. <div>
  274. <span
  275. v-if="scope.row.packingType != '散装'"
  276. style="margin-left: 6px"
  277. >{{ scope.row.baggingNotes }}</span
  278. >
  279. </div>
  280. </el-popover>
  281. </template>
  282. </el-table-column>
  283. <el-table-column prop="status" label="状态">
  284. <template slot-scope="scope">
  285. <el-popover
  286. placement="left"
  287. :width="285"
  288. trigger="click"
  289. visible-arrow="false"
  290. @show="history(scope.row)"
  291. >
  292. <template>
  293. <span slot="reference">
  294. <span
  295. v-if="scope.row.status == '待审核'"
  296. class="executory"
  297. ></span>
  298. <span
  299. v-if="scope.row.status == '已成交'"
  300. class="inExecution"
  301. ></span>
  302. <span v-if="scope.row.status == '已完成'" class="done"></span>
  303. {{ scope.row.status }}
  304. </span>
  305. </template>
  306. </el-popover>
  307. </template>
  308. </el-table-column>
  309. <el-table-column
  310. class="table_td"
  311. label="更新时间"
  312. prop="updateDate"
  313. width="130"
  314. ></el-table-column>
  315. <el-table-column class="table_td" label="出库结算" prop="" width="130">
  316. <template slot-scope="scope"
  317. ><span v-if="scope.row.salePlanType != '现货'"
  318. >--</span
  319. ></template
  320. ></el-table-column
  321. >
  322. <el-table-column class="table_td" label="平仓结算" prop="" width="130"
  323. ><template slot-scope="scope"
  324. ><span v-if="scope.row.salePlanType != '现货'"
  325. >--</span
  326. ></template
  327. >
  328. </el-table-column>
  329. <el-table-column prop="seller" label="操作" width="360">
  330. <template slot-scope="scope">
  331. <!---成交-->
  332. <div
  333. v-if="
  334. (scope.row.status == '已通过' || scope.row.status == '已成交') &&
  335. scope.row.salePlanType == '期货'
  336. "
  337. class="record"
  338. @click="makeabargain(scope.row)"
  339. >
  340. 成交
  341. </div>
  342. <!-- 补充定金 -->
  343. <div
  344. v-if="
  345. scope.row.defaultDeposit > 0 && scope.row.salePlanType == '期货'
  346. "
  347. class="record"
  348. @click="addthedeposit(scope.row)"
  349. >
  350. 补充定金
  351. </div>
  352. <!--解冻定金-->
  353. <div
  354. v-if="
  355. scope.row.freezingDeposit > 0 && scope.row.salePlanType == '期货'
  356. "
  357. class="record"
  358. @click="unfreeze(scope.row)"
  359. >
  360. 解冻定金
  361. </div>
  362. <!-- 平仓 -->
  363. <div
  364. v-if="
  365. scope.row.openPosition > 0 && scope.row.salePlanType == '期货'
  366. "
  367. class="record"
  368. @click="cloaeposition1(scope.row)"
  369. >
  370. 平仓
  371. </div>
  372. <!--完成-->
  373. <div
  374. v-if="
  375. (scope.row.status == '已通过' || scope.row.status == '已成交') &&
  376. scope.row.salePlanType == '期货'
  377. "
  378. class="record"
  379. @click="handle(scope.row)"
  380. >
  381. 完成
  382. </div>
  383. <!-- 审核 -->
  384. <div
  385. v-if="scope.row.status == '待审核'"
  386. type="text"
  387. class="record"
  388. @click="aduit(scope.row)"
  389. >
  390. 审核
  391. </div>
  392. <!--删除-->
  393. <div
  394. v-if="scope.row.status == '待审核'"
  395. class="record"
  396. @click="deletehandle(scope.row)"
  397. >
  398. 删除
  399. </div>
  400. </template>
  401. </el-table-column>
  402. </el-table>
  403. <!-- 页数 -->
  404. <el-pagination
  405. @size-change="handleSizeChange"
  406. @current-change="handleCurrentChange"
  407. :current-page="currentPage"
  408. :page-size="pageSize"
  409. layout="total, sizes, prev, pager, next, jumper"
  410. :total="deptBudgetTotal"
  411. ></el-pagination>
  412. <!--成交-->
  413. <el-dialog
  414. width="30%"
  415. title="成交"
  416. :visible.sync="dialogFormVisible1"
  417. :append-to-body="true"
  418. >
  419. <el-form ref="warehouseList">
  420. <el-form-item
  421. label="成交价(元/吨)"
  422. prop="transactionPrice"
  423. :label-width="formLabelWidth"
  424. >
  425. <el-input
  426. v-model="clinchdeal1.transactionPrice"
  427. autocomplete="off"
  428. placeholder="请输入成交价"
  429. class="deal"
  430. ></el-input>
  431. </el-form-item>
  432. <el-form-item
  433. label="成交量(吨)"
  434. prop="transactionsNumber"
  435. :label-width="formLabelWidth"
  436. >
  437. <el-input
  438. v-model="clinchdeal1.turnover"
  439. autocomplete="off"
  440. placeholder="请输入成交量"
  441. class="deal"
  442. ></el-input>
  443. </el-form-item>
  444. <el-form-item
  445. label="基差(元/吨)"
  446. prop="basis"
  447. :label-width="formLabelWidth"
  448. >
  449. <el-input
  450. v-model="clinchdeal1.basis"
  451. autocomplete="off"
  452. placeholder="请输入基差"
  453. class="deal"
  454. ></el-input>
  455. </el-form-item>
  456. <el-form-item
  457. label="成交日期"
  458. prop="submissionDate"
  459. :label-width="formLabelWidth"
  460. class="deal"
  461. >
  462. <ws-date-picker
  463. v-model="clinchdeal1.dealDate"
  464. type="date"
  465. placeholder="请选择成交日期"
  466. value-format="yyyy-MM-dd"
  467. class="deal"
  468. />
  469. </el-form-item>
  470. </el-form>
  471. <div slot="footer" class="dialog-footer">
  472. <el-button @click="dialogFormVisible1 = false">取 消</el-button>
  473. <el-button type="primary" @click="chengjiao()">确 定</el-button>
  474. </div>
  475. </el-dialog>
  476. <!-- 补充定金 -->
  477. <el-dialog
  478. width="40%"
  479. title="补充定金"
  480. :visible.sync="dialogFormVisible3"
  481. :append-to-body="true"
  482. >
  483. <el-form :model="form">
  484. <h5>{{ replenishlist.customer }}</h5>
  485. <el-form-item label="拖欠定金" :label-width="formLabelWidth">
  486. {{ replenishlist.defaultDeposit }}
  487. </el-form-item>
  488. <el-form-item label="可用定金" :label-width="formLabelWidth">
  489. {{ replenishlist.totalDeposit - replenishlist.freezingDeposit }}
  490. </el-form-item>
  491. <el-form-item label="补充金额" :label-width="formLabelWidth">
  492. <el-input
  493. v-model="replenishlist.money"
  494. autocomplete="off"
  495. placeholder="请输入补充金额"
  496. class="deal"
  497. ></el-input>
  498. </el-form-item>
  499. </el-form>
  500. <div slot="footer" class="dialog-footer">
  501. <el-button @click="dialogFormVisible3 = false">取 消</el-button>
  502. <el-button type="primary" @click="replenish()">确 定</el-button>
  503. </div>
  504. </el-dialog>
  505. <!-- 平仓 -->
  506. <el-dialog
  507. width="40%"
  508. title="平仓"
  509. :visible.sync="dialogFormVisible2"
  510. :append-to-body="true"
  511. >
  512. <el-form class="closeposition">
  513. <el-form-item label="成交价格(元/吨)" prop="transactionPrice">
  514. <ws-select
  515. v-model="closePositionList1.transactionPrice"
  516. placeholder
  517. class="deal"
  518. placeholder="请输入成交价"
  519. >
  520. <ws-option
  521. v-for="item in transactionRecordList"
  522. :key="item.constKey"
  523. :label="item.transactionPrice"
  524. :value="item.transactionPrice"
  525. />
  526. </ws-select>
  527. </el-form-item>
  528. <el-form-item label="可平仓数量(吨)" prop="openPosition">
  529. <el-input
  530. v-model="closePositionList1.openPosition"
  531. autocomplete="off"
  532. class="deal"
  533. ></el-input>
  534. </el-form-item>
  535. <el-form-item label="平仓数量(吨)" prop="closingQuantity">
  536. <el-input
  537. v-model="closePositionList1.closingQuantity"
  538. autocomplete="off"
  539. placeholder="请输入平仓数量"
  540. class="deal"
  541. ></el-input>
  542. </el-form-item>
  543. <el-form-item label="平仓价格(元/吨)" prop="closeRate">
  544. <el-input
  545. v-model="closePositionList1.closeRate"
  546. autocomplete="off"
  547. placeholder="请输入平仓价格"
  548. class="deal"
  549. ></el-input>
  550. </el-form-item>
  551. <el-form-item label="平仓基差(元/吨)" prop="closingBasis">
  552. <el-input
  553. @input="yingfu"
  554. v-model="closePositionList1.closingBasis"
  555. autocomplete="off"
  556. placeholder="请输入平仓基差"
  557. class="deal"
  558. ></el-input>
  559. </el-form-item>
  560. <el-form-item label="平仓应付(元)" prop="closingPositionPayable">
  561. <el-input
  562. v-model="closePositionList1.closingPositionPayable"
  563. readonly="readonly"
  564. autocomplete="off"
  565. placeholder="不用编辑,自动计算"
  566. class="deal"
  567. ></el-input>
  568. </el-form-item>
  569. <el-form-item label="平仓日期" prop="closePositionDate">
  570. <el-date-picker
  571. v-model="closePositionList1.closePositionDate"
  572. type="date"
  573. placeholder="选择日期"
  574. format="yyyy 年 MM 月 dd 日"
  575. value-format="yyyy-MM-dd"
  576. />
  577. </el-form-item>
  578. </el-form>
  579. <div slot="footer" class="dialog-footer">
  580. <el-button @click="dialogFormVisible2 = false">取 消</el-button>
  581. <el-button type="primary" @click="closepositionconfirm()"
  582. >确 定</el-button
  583. >
  584. </div>
  585. </el-dialog>
  586. <!-- 审核 -->
  587. <el-dialog
  588. width="40%"
  589. title="审核"
  590. :visible.sync="dialogFormVisible4"
  591. :append-to-body="true"
  592. >
  593. <el-form>
  594. <el-form-item label="交易类型" :label-width="formLabelWidth">
  595. 销售
  596. </el-form-item>
  597. <el-form-item label="交易目标" :label-width="formLabelWidth">
  598. {{ aduitlist.tradingTarget }}
  599. </el-form-item>
  600. <el-form-item label="买方" :label-width="formLabelWidth">
  601. {{ aduitlist.buyer }}
  602. </el-form-item>
  603. <el-form-item label="买方电话" :label-width="formLabelWidth">
  604. {{ aduitlist.buyerPhone }}
  605. </el-form-item>
  606. <el-form-item label="交易数量(吨)" :label-width="formLabelWidth">
  607. {{ aduitlist.transactionsNumber }}
  608. </el-form-item>
  609. <el-form-item label="提交时间" :label-width="formLabelWidth">
  610. {{ aduitlist.submitDate }}
  611. </el-form-item>
  612. <el-form-item label="包装方式" :label-width="formLabelWidth">
  613. <ws-select
  614. v-model="aduitlist.packingType"
  615. placeholder
  616. class="deal"
  617. @change="selectpackingType"
  618. >
  619. <ws-option
  620. v-for="item in packingTypeList"
  621. :key="item.constKey"
  622. :label="item.constValue"
  623. :value="item.constValue"
  624. />
  625. </ws-select>
  626. </el-form-item>
  627. <el-form-item
  628. v-if="aduitlist.packingType != '散装'"
  629. label="袋装备注"
  630. :label-width="formLabelWidth"
  631. >
  632. <el-input
  633. maxlength="30"
  634. v-model="aduitlist.baggingNotes"
  635. autocomplete="off"
  636. placeholder="请输入袋装备注,最多30个字"
  637. class="deal"
  638. ></el-input>
  639. </el-form-item>
  640. <el-form-item label="发票类型" :label-width="formLabelWidth">
  641. <ws-select
  642. v-model="aduitlist.type"
  643. placeholder
  644. class="deal"
  645. @change="selectType"
  646. >
  647. <ws-option
  648. v-for="item in invoiceList"
  649. :key="item.constKey"
  650. :label="item.constValue"
  651. :value="item.constValue"
  652. />
  653. </ws-select>
  654. </el-form-item>
  655. <el-form-item label="单价(元/吨)" :label-width="formLabelWidth">
  656. <el-input
  657. v-model="aduitlist.unitPrice"
  658. autocomplete="off"
  659. placeholder="请输入单价"
  660. class="deal"
  661. ></el-input>
  662. </el-form-item>
  663. <el-form-item
  664. v-if="aduitlist.salePlanType == '期货'"
  665. label="基差(元/吨)"
  666. :label-width="formLabelWidth"
  667. v
  668. >
  669. <el-input
  670. v-model="aduitlist.basis"
  671. autocomplete="off"
  672. placeholder="请输入基差"
  673. class="deal"
  674. ></el-input>
  675. </el-form-item>
  676. <el-form-item
  677. v-if="aduitlist.salePlanType == '期货'"
  678. label="卸车费(元/吨)"
  679. :label-width="formLabelWidth"
  680. >
  681. <el-input
  682. v-model="aduitlist.unloadingCharge"
  683. autocomplete="off"
  684. placeholder="请输入卸车费"
  685. class="deal"
  686. ></el-input>
  687. </el-form-item>
  688. <el-form-item
  689. v-if="aduitlist.salePlanType == '期货'"
  690. label="发票费用(元/吨)"
  691. :label-width="formLabelWidth"
  692. >
  693. <el-input
  694. v-model="aduitlist.invoiceFee"
  695. autocomplete="off"
  696. placeholder="请输入发票费用"
  697. class="deal"
  698. ></el-input>
  699. </el-form-item>
  700. <el-form-item label="合同编号" :label-width="formLabelWidth">
  701. <ws-select
  702. v-model="aduitlist.contractNo"
  703. placeholder="请选择合同编号"
  704. class="deal"
  705. >
  706. <ws-option
  707. v-for="item in contractNolist"
  708. :key="item.constKey"
  709. :label="item.contractNo"
  710. :value="item.contractNo"
  711. />
  712. </ws-select>
  713. </el-form-item>
  714. </el-form>
  715. <div slot="footer" class="dialog-footer">
  716. <el-button @click="dialogFormVisible4 = false">取 消</el-button>
  717. <el-button type="primary" @click="aduitconfirm()">通过</el-button>
  718. </div>
  719. </el-dialog>
  720. <!-- 客户信息 -->
  721. <el-dialog
  722. width="30%"
  723. title="客户信息"
  724. :visible.sync="dialogFormVisible8"
  725. :append-to-body="true"
  726. >
  727. <el-form class="customer" :model="form">
  728. <h4 v-if="customerlist.customerTypeFlag != 1">营业执照</h4>
  729. <img
  730. v-if="customerlist.customerTypeFlag != 1"
  731. width="50%"
  732. :src="customerlist.businessLicenseAddressUrl"
  733. alt
  734. />
  735. <el-form-item
  736. v-if="customerlist.customerTypeFlag != 1"
  737. label="公司名称"
  738. :label-width="formLabelWidth"
  739. >
  740. {{ customerlist.compName }}
  741. </el-form-item>
  742. <el-form-item
  743. v-if="customerlist.customerTypeFlag != 1"
  744. label="纳税人识别号"
  745. :label-width="formLabelWidth"
  746. >
  747. {{ customerlist.payTaxesCard }}
  748. </el-form-item>
  749. <div class="flex">
  750. <div style="flex: 1; text-align: center">
  751. <h4>身份证正面</h4>
  752. <img width="100%" :src="customerlist.cardAddressUrl1" alt />
  753. </div>
  754. <div style="flex: 1; text-align: center">
  755. <h4>身份证反面</h4>
  756. <img width="100%" :src="customerlist.cardAddressUrl2" alt />
  757. </div>
  758. </div>
  759. <el-form-item label="姓名" :label-width="formLabelWidth">
  760. {{ customerlist.customerName }}
  761. </el-form-item>
  762. <el-form-item label="身份证号" :label-width="formLabelWidth">
  763. {{ customerlist.customerNumberCard }}
  764. </el-form-item>
  765. <div class="flex">
  766. <div style="flex: 1; text-align: center">
  767. <h4>银行卡正面</h4>
  768. <img width="100%" :src="customerlist.payeeAddressUrl1" alt />
  769. </div>
  770. <div style="flex: 1; text-align: center">
  771. <h4>银行卡反面</h4>
  772. <img width="100%" :src="customerlist.payeeAddressUrl2" alt />
  773. </div>
  774. </div>
  775. <el-form-item label="银行卡号" :label-width="formLabelWidth">
  776. {{ customerlist.bankCard }}
  777. </el-form-item>
  778. <el-form-item label="开户行" :label-width="formLabelWidth">
  779. {{ customerlist.bankDeposit }}
  780. </el-form-item>
  781. <el-form-item label="开户支行" :label-width="formLabelWidth">
  782. {{ customerlist.bankDepositBranch }}
  783. </el-form-item>
  784. <el-form-item
  785. label="收款人姓名"
  786. :label-width="formLabelWidth"
  787. v-if="customerlist.customerTypeFlag == 1"
  788. >
  789. {{ customerlist.payeeName }}
  790. </el-form-item>
  791. <el-form-item
  792. label="收款人身份证号"
  793. :label-width="formLabelWidth"
  794. v-if="customerlist.customerTypeFlag == 1"
  795. >
  796. {{ customerlist.payeeNumberCard }}
  797. </el-form-item>
  798. <el-form-item label="手机号" :label-width="formLabelWidth">
  799. {{ customerlist.customerPhone }}
  800. </el-form-item>
  801. <el-form-item
  802. label="公司地址"
  803. :label-width="formLabelWidth"
  804. v-if="customerlist.customerTypeFlag != 1"
  805. >
  806. {{ customerlist.compAddress }}
  807. </el-form-item>
  808. <el-form-item
  809. label="联系地址"
  810. :label-width="formLabelWidth"
  811. v-if="customerlist.customerTypeFlag == 1"
  812. >
  813. {{ customerlist.compAddress }}
  814. </el-form-item>
  815. </el-form>
  816. <div slot="footer" class="dialog-footer">
  817. <el-button @click="dialogFormVisible8 = false">取 消</el-button>
  818. </div>
  819. </el-dialog>
  820. <!-- 成交记录 -->
  821. <el-dialog
  822. width="40%"
  823. title="成交记录"
  824. :visible.sync="dialogFormVisible6"
  825. :append-to-body="true"
  826. >
  827. <el-table :data="transactionRecordList">
  828. <el-table-column prop="transactionPrice" label="成交价">
  829. </el-table-column>
  830. <el-table-column prop="basis" label="基差"> </el-table-column>
  831. <el-table-column prop="turnover" label="成交量"> </el-table-column>
  832. <el-table-column prop="dealDate" label="成交日期"> </el-table-column>
  833. </el-table>
  834. </el-dialog>
  835. <!-- 平仓记录 -->
  836. <el-dialog
  837. width="40%"
  838. title="平仓记录"
  839. :visible.sync="dialogFormVisible7"
  840. :append-to-body="true"
  841. >
  842. <el-table :data="closePositionList">
  843. <el-table-column prop="transactionPrice" label="成交价">
  844. </el-table-column>
  845. <el-table-column prop="closingPrice" label="平仓价"> </el-table-column>
  846. <el-table-column prop="basis" label="基差"> </el-table-column>
  847. <el-table-column prop="turnover" label="平仓量"> </el-table-column>
  848. <el-table-column prop="dealDate" label="平仓日期"> </el-table-column>
  849. </el-table>
  850. </el-dialog>
  851. <!--改价记录-->
  852. <el-dialog
  853. width="30%"
  854. title="改价记录"
  855. :visible.sync="dialogFormVisible5"
  856. :append-to-body="true"
  857. >
  858. <div v-for="item in pricechange">
  859. <div>{{ item.priceType }}{{ item.price }}</div>
  860. <div>{{ item.updateDate }}</div>
  861. </div>
  862. </el-dialog>
  863. </div>
  864. <!-- </div> -->
  865. </template>
  866. <script>
  867. import { packList } from '@/model/contarct/index'
  868. import {
  869. detailsList,
  870. chengList,
  871. closePositionList,
  872. aduitsale,
  873. aduitcontractno,
  874. editStatus,
  875. deletesale,
  876. getpricelist,
  877. } from '@/model/salesManagement/index'
  878. import { downloadFile } from '@/utils/batchDown'
  879. import Pagination from '@/components/Pagination'
  880. import WsUpload from '@/components/WsUpload'
  881. import { dayjs, fmoney, EventBus } from 'base-core-lib'
  882. export default {
  883. name: 'viewSpareMoney',
  884. components: {
  885. WsUpload,
  886. Pagination,
  887. },
  888. watch: {
  889. vesselId(val) {
  890. this.getList()
  891. },
  892. isShow(val) {
  893. this.showType = val
  894. },
  895. },
  896. data() {
  897. return {
  898. dialogFormVisible1: false,
  899. dialogFormVisible2: false,
  900. dialogFormVisible3: false,
  901. dialogFormVisible4: false,
  902. dialogFormVisible5: false,
  903. dialogFormVisible6: false,
  904. dialogFormVisible7: false,
  905. dialogFormVisible8: false,
  906. dialogVisible: false,
  907. dialogImageUrl: '',
  908. form: {
  909. transactionPrice: '',
  910. transactionsNumber: '',
  911. basis: 0,
  912. submissionDate: '',
  913. // delivery: false,
  914. // type: [],
  915. // resource: '',
  916. // desc: ''
  917. },
  918. formLabelWidth: '120px',
  919. basischange: false,
  920. clinchdeal: {},
  921. clinchdeal1: {},
  922. barWidth: 0,
  923. barHeight: 0,
  924. retioX: 1,
  925. ratioY: 1,
  926. isTaped: false,
  927. isHover: false,
  928. isShow: !this.autohide,
  929. //弹出框
  930. dialogViewSpareMoney: false,
  931. dialogApproveFormVisible: false,
  932. // 船舶类型
  933. monetaryKey: null,
  934. // 表格显示数据
  935. tableDate: [],
  936. // 是否显示
  937. showType: true,
  938. // 年
  939. year: '',
  940. pickerOptions: {},
  941. value2: '',
  942. deptBudgetTotal: 0,
  943. currentPage: 1,
  944. tranTypeKey: 1,
  945. pageSize: 10,
  946. searchType: '',
  947. searchTypeText: '全部订单',
  948. searchKeyWord: '',
  949. contractType: 1,
  950. enter: {
  951. closePositionList: [],
  952. },
  953. transactionRecordList: [],
  954. // taskTypeList:[
  955. // {value:'待审核',type:1},
  956. // {value:'已完成',type:2},
  957. // {value:'已通过',type:3},
  958. // {value:'已成交',type:4},
  959. // ],
  960. // 提交类型
  961. submitType: true,
  962. size: 10,
  963. spanArr: [],
  964. // contractNo: '',
  965. customerlist: {},
  966. packingTypeList: [],
  967. inOutTaskNo: '',
  968. compId: sessionStorage.getItem('ws-pf_compId'),
  969. deptCircularPage: {},
  970. warehouseList: [],
  971. deptBudgetList: {},
  972. transactionRecordList: {},
  973. pcFlag: 1,
  974. invoiceList: [],
  975. contractNolist: [],
  976. pricechange: [],
  977. searchTypeList: [
  978. { value: '待审核', type: 1 },
  979. { value: '执行中', type: 2 },
  980. { value: '已完成', type: 3 },
  981. { value: '全部订单', type: '' },
  982. ],
  983. aduitlist: {},
  984. basis: 0,
  985. replenishlist: {},
  986. closePositionList1: {},
  987. closePositionList: [],
  988. historyList: [],
  989. pickerBeginDateBefore: {
  990. disabledDate: (time) => {
  991. return time.getTime() > Date.now()
  992. },
  993. },
  994. accessoryTFs: false,
  995. }
  996. },
  997. activated() {
  998. // this.loaddata()
  999. this.getList()
  1000. this.showType = this.isShow
  1001. },
  1002. methods: {
  1003. //查找
  1004. find() {
  1005. this.currentPage = 1
  1006. this.getList()
  1007. },
  1008. selectExamineType(e) {
  1009. for (var i = 0; i < this.searchTypeList.length; i++) {
  1010. if (this.searchTypeList[i].value == e) {
  1011. this.searchType = this.searchTypeList[i].type
  1012. }
  1013. }
  1014. },
  1015. //完成
  1016. handle(item) {
  1017. this.$confirm(`状态修改为已完成后不可再进行交易操作,是否确定修改?`, {
  1018. confirmButtonText: '确定',
  1019. cancelButtonText: '取消',
  1020. type: 'warning',
  1021. }).then(() => {
  1022. editStatus({ id: item.id, flag: 2 })
  1023. .toPromise()
  1024. .then((response) => {
  1025. this.$message.success('修改成功')
  1026. this.getList()
  1027. })
  1028. .catch((req) => {
  1029. this.$message.success('修改失败')
  1030. })
  1031. })
  1032. },
  1033. //成交
  1034. makeabargain(item) {
  1035. this.dialogFormVisible1 = true
  1036. this.clinchdeal.id = item.id
  1037. this.clinchdeal.contractNo = item.contractNo
  1038. this.clinchdeal.goodsName = item.goodsName
  1039. this.clinchdeal.planId = item.planId
  1040. this.clinchdeal.buyer = item.buyer
  1041. this.clinchdeal.commonId = item.commonId
  1042. },
  1043. //成交
  1044. chengjiao() {
  1045. if (!this.clinchdeal1.transactionPrice) {
  1046. this.$message({
  1047. message: '成交价不能为空',
  1048. type: 'warning',
  1049. })
  1050. return
  1051. }
  1052. if (
  1053. (this.clinchdeal1.transactionPrice &&
  1054. String(this.clinchdeal1.transactionPrice).indexOf('.') != -1 &&
  1055. String(this.clinchdeal1.transactionPrice).length -
  1056. (String(this.clinchdeal1.transactionPrice).indexOf('.') + 1) >
  1057. 2) ||
  1058. this.clinchdeal1.transactionPrice > 100000 ||
  1059. this.clinchdeal1.transactionPrice < 0
  1060. ) {
  1061. this.$message({
  1062. message: '成交价输入错误',
  1063. type: 'warning',
  1064. })
  1065. return
  1066. }
  1067. if (!this.clinchdeal1.turnover) {
  1068. this.$message({
  1069. message: '成交量不能为空',
  1070. type: 'warning',
  1071. })
  1072. return
  1073. }
  1074. if (
  1075. (this.clinchdeal1.turnover &&
  1076. String(this.clinchdeal1.turnover).indexOf('.') != -1 &&
  1077. String(this.clinchdeal1.turnover).length -
  1078. (String(this.clinchdeal1.turnover).indexOf('.') + 1) >
  1079. 2) ||
  1080. this.clinchdeal1.turnover > 1000000 ||
  1081. this.clinchdeal1.turnover < 1
  1082. ) {
  1083. this.$message({
  1084. message: '成交量输入错误',
  1085. type: 'warning',
  1086. })
  1087. return
  1088. }
  1089. if (!this.clinchdeal1.basis) {
  1090. this.$message({
  1091. message: '基差不能为空',
  1092. type: 'warning',
  1093. })
  1094. return
  1095. }
  1096. if (
  1097. (this.clinchdeal1.basis &&
  1098. String(this.clinchdeal1.basis).indexOf('.') != -1 &&
  1099. String(this.clinchdeal1.basis).length -
  1100. (String(this.clinchdeal1.basis).indexOf('.') + 1) >
  1101. 2) ||
  1102. this.clinchdeal1.basis > 10000 ||
  1103. this.clinchdeal1.basis < 1
  1104. ) {
  1105. this.$message({
  1106. message: '基差输入错误',
  1107. type: 'warning',
  1108. })
  1109. return
  1110. }
  1111. if (!this.clinchdeal1.dealDate) {
  1112. this.$message({
  1113. message: '成交日期不能为空',
  1114. type: 'warning',
  1115. })
  1116. return
  1117. }
  1118. this.$confirm(`确定提交成交信息`, {
  1119. cancelButtonText: '取消',
  1120. confirmButtonText: '确定',
  1121. type: 'warning',
  1122. }).then(() => {
  1123. chengList({
  1124. transactionRecord: this.clinchdeal1,
  1125. id: this.clinchdeal.id,
  1126. compId: sessionStorage.getItem('ws-pf_compId'),
  1127. contractNo: this.clinchdeal.contractNo,
  1128. planId: this.clinchdeal.planId,
  1129. goodsName: this.clinchdeal.goodsName,
  1130. buyer: this.clinchdeal.buyer,
  1131. commonId: this.clinchdeal.commonId,
  1132. })
  1133. .toPromise()
  1134. .then((response) => {
  1135. this.$message.success('成交成功')
  1136. this.dialogFormVisible1 = false
  1137. // this.$router.go(-1)
  1138. })
  1139. .catch(() => {
  1140. return false
  1141. })
  1142. })
  1143. },
  1144. //删除
  1145. deletehandle(item) {
  1146. this.$confirm(`销售订单删除后不可恢复,是否确定删除?`, {
  1147. confirmButtonText: '确定',
  1148. cancelButtonText: '取消',
  1149. type: 'warning',
  1150. }).then(() => {
  1151. deletesale({ id: item.id })
  1152. .toPromise()
  1153. .then((response) => {
  1154. this.$message.success('删除订单成功')
  1155. this.getList()
  1156. })
  1157. .catch((req) => {
  1158. this.$message.success('删除订单失败')
  1159. })
  1160. })
  1161. },
  1162. //平仓
  1163. closepositionconfirm() {
  1164. if (!this.closePositionList1.transactionPrice) {
  1165. this.$message({
  1166. message: '成交价不能为空!',
  1167. type: 'warning',
  1168. })
  1169. return
  1170. }
  1171. if (!this.closePositionList1.closingQuantity) {
  1172. this.$message({
  1173. message: '平仓数量不能为空!',
  1174. type: 'warning',
  1175. })
  1176. return
  1177. }
  1178. if (
  1179. (this.closePositionList1.closingQuantity &&
  1180. String(this.closePositionList1.closingQuantity).indexOf('.') != -1 &&
  1181. String(this.closePositionList1.closingQuantity).length -
  1182. (String(this.closePositionList1.closingQuantity).indexOf('.') + 1) >
  1183. 2) ||
  1184. this.closePositionList1.closingQuantity >
  1185. this.closePositionList1.openPosition ||
  1186. this.closePositionList1.closingQuantity < 1
  1187. ) {
  1188. this.$message({
  1189. message: '平仓数量超出上限',
  1190. type: 'warning',
  1191. })
  1192. return
  1193. }
  1194. if (!this.closePositionList1.closeRate) {
  1195. this.$message({
  1196. message: '平仓价格不能为空!',
  1197. type: 'warning',
  1198. })
  1199. return
  1200. }
  1201. if (
  1202. (this.closePositionList1.closeRate &&
  1203. String(this.closePositionList1.closeRate).indexOf('.') != -1 &&
  1204. String(this.closePositionList1.closeRate).length -
  1205. (String(this.closePositionList1.closeRate).indexOf('.') + 1) >
  1206. 2) ||
  1207. this.closePositionList1.closeRate > 100000 ||
  1208. this.closePositionList1.closeRate < 0
  1209. ) {
  1210. this.$message({
  1211. message: '平仓价格输入错误',
  1212. type: 'warning',
  1213. })
  1214. return
  1215. }
  1216. if (!this.closePositionList1.closingBasis) {
  1217. this.$message({
  1218. message: '平仓基差不能为空!',
  1219. type: 'warning',
  1220. })
  1221. return
  1222. }
  1223. if (
  1224. (this.closePositionList1.closingBasis &&
  1225. String(this.closePositionList1.closingBasis).indexOf('.') != -1 &&
  1226. String(this.closePositionList1.closingBasis).length -
  1227. (String(this.closePositionList1.closingBasis).indexOf('.') + 1) >
  1228. 2) ||
  1229. this.closePositionList1.closingBasis > 10000 ||
  1230. this.closePositionList1.closingBasis < 1
  1231. ) {
  1232. this.$message({
  1233. message: '平仓基差输入错误',
  1234. type: 'warning',
  1235. })
  1236. return
  1237. }
  1238. if (!this.closePositionList1.closePositionDate) {
  1239. this.$message({
  1240. message: '平仓日期不能为空!',
  1241. type: 'warning',
  1242. })
  1243. return
  1244. }
  1245. this.closePositionList1.compId = sessionStorage.getItem('ws-pf_compId')
  1246. closePositionList(this.closePositionList1)
  1247. .toPromise()
  1248. .then((response) => {
  1249. this.$message.success('平仓成功')
  1250. this.closePositionList1 = {}
  1251. this.dialogFormVisible2 = false
  1252. this.getList()
  1253. })
  1254. .catch((req) => {
  1255. this.$message.warning('平仓失败')
  1256. })
  1257. },
  1258. cloaeposition1(item) {
  1259. this.dialogFormVisible2 = true
  1260. this.$set(this.closePositionList1, 'id', item.id)
  1261. // this.transactionRecordList = item.transactionRecordList
  1262. this.$set(this.closePositionList1, 'openPosition', item.openPosition)
  1263. this.$set(
  1264. this.closePositionList1,
  1265. 'transactionsNumber',
  1266. item.transactionsNumber
  1267. )
  1268. this.$set(this.closePositionList1, 'contractNo', item.contractNo)
  1269. this.$set(this.closePositionList1, 'planId', item.planId)
  1270. this.$set(this.closePositionList1, 'closeRate', item.closeRate)
  1271. this.$set(this.closePositionList1, 'seller', item.seller)
  1272. this.$set(this.closePositionList1, 'commonId', item.commonId)
  1273. getpricelist({
  1274. id: item.id,
  1275. })
  1276. .toPromise()
  1277. .then((response) => {
  1278. this.transactionRecordList = response
  1279. })
  1280. },
  1281. yingfu(item) {
  1282. this.closePositionList1.closingPositionPayable =
  1283. (this.closePositionList1.closeRate -
  1284. this.closePositionList1.transactionPrice -
  1285. this.closePositionList1.closingBasis) *
  1286. this.closePositionList1.closingQuantity
  1287. },
  1288. //修改基差
  1289. changebasis(item) {
  1290. editStatus({ basis: this.basis, id: item.id, flag: 3 })
  1291. .toPromise()
  1292. .then((response) => {
  1293. this.$message.success('修改基差成功')
  1294. this.getList()
  1295. })
  1296. .catch((req) => {
  1297. this.$message.success('修改基差失败')
  1298. })
  1299. },
  1300. editbasis(item) {
  1301. this.basis = item.basis
  1302. item.basischange = true
  1303. },
  1304. //解冻定金
  1305. unfreeze(item) {
  1306. this.$confirm(`确定解冻订单(${item.salePlan})的定金?`, {
  1307. confirmButtonText: '确定',
  1308. cancelButtonText: '取消',
  1309. type: 'warning',
  1310. }).then(() => {
  1311. editStatus({ id: item.id, flag: 1 })
  1312. .toPromise()
  1313. .then((response) => {
  1314. this.$message.success('解冻定金成功')
  1315. this.getList()
  1316. })
  1317. .catch((req) => {
  1318. this.$message.success('解冻定金失败')
  1319. })
  1320. })
  1321. },
  1322. //补充定金
  1323. addthedeposit(item) {
  1324. this.dialogFormVisible3 = true
  1325. this.$set(this.replenishlist, 'id', item.id)
  1326. this.$set(this.replenishlist, 'customer', item.customer)
  1327. this.$set(this.replenishlist, 'defaultDeposit', item.defaultDeposit)
  1328. this.$set(
  1329. this.replenishlist,
  1330. 'totalDeposit',
  1331. item.customerInfo.totalDeposit
  1332. )
  1333. this.$set(this.replenishlist, 'freezingDeposit', item.freezingDeposit)
  1334. },
  1335. replenish() {
  1336. this.dialogFormVisible3 = false
  1337. if (!this.replenishlist.money) {
  1338. this.$message({
  1339. message: '补充金额不能为空!',
  1340. type: 'warning',
  1341. })
  1342. return
  1343. }
  1344. if (
  1345. String(this.replenishlist.money).indexOf('.') != -1 &&
  1346. String(this.replenishlist.money).length -
  1347. (String(this.replenishlist.money).indexOf('.') + 1) >
  1348. 2
  1349. ) {
  1350. this.$message({
  1351. message: '补充金额输入错误!',
  1352. type: 'warning',
  1353. })
  1354. return
  1355. }
  1356. if (this.replenishlist.money > this.replenishlist.defaultDeposit) {
  1357. this.$message({
  1358. message: '补充金额不能超过拖欠定金!',
  1359. type: 'warning',
  1360. })
  1361. return
  1362. }
  1363. if (
  1364. this.replenishlist.money >
  1365. this.replenishlist.totalDeposit - this.replenishlist.freezingDeposit
  1366. ) {
  1367. this.$message({
  1368. message: '补充金额不能超过可用定金!',
  1369. type: 'warning',
  1370. })
  1371. return
  1372. }
  1373. editStatus({
  1374. money: this.replenishlist.money,
  1375. id: this.replenishlist.id,
  1376. flag: 0,
  1377. })
  1378. .toPromise()
  1379. .then((response) => {
  1380. this.$message.success('补充成功')
  1381. this.getList()
  1382. })
  1383. .catch((req) => {
  1384. this.$message.success('补充失败')
  1385. })
  1386. },
  1387. //审核
  1388. aduit(item) {
  1389. this.dialogFormVisible4 = true
  1390. this.aduitlist.id = item.id
  1391. this.aduitlist.type = '销售'
  1392. this.$set(this.aduitlist, 'buyer', item.buyer)
  1393. this.$set(this.aduitlist, 'buyerPhone', item.buyerPhone)
  1394. this.$set(this.aduitlist, 'tradingTarget', item.tradingTarget)
  1395. this.$set(this.aduitlist, 'transactionsNumber', item.transactionsNumber)
  1396. this.$set(this.aduitlist, 'submitDate', item.createDate)
  1397. this.$set(this.aduitlist, 'packingType', item.packingType)
  1398. this.$set(this.aduitlist, 'packingTypeKey', item.packingTypeKey)
  1399. this.$set(this.aduitlist, 'taskId', item.taskId)
  1400. this.$set(this.aduitlist, 'type', item.type)
  1401. this.$set(this.aduitlist, 'typeKey', item.typeKey)
  1402. this.$set(this.aduitlist, 'salePlanType', item.salePlanType)
  1403. },
  1404. aduitconfirm() {
  1405. if (!this.aduitlist.unitPrice) {
  1406. this.$message({
  1407. message: '单价不能为空!',
  1408. type: 'warning',
  1409. })
  1410. return
  1411. }
  1412. if (!this.aduitlist.basis && this.aduitlist.salePlanType == '期货') {
  1413. this.$message({
  1414. message: '基差不能为空!',
  1415. type: 'warning',
  1416. })
  1417. return
  1418. }
  1419. if (!this.aduitlist.contractNo) {
  1420. this.$message({
  1421. message: '合同编号不能为空!',
  1422. type: 'warning',
  1423. })
  1424. return
  1425. }
  1426. if (
  1427. this.aduitlist.packingTypeKey != 1 &&
  1428. this.aduitlist.baggingNotes.length > 30
  1429. ) {
  1430. this.$message({
  1431. message: '袋装备注最长不能超过30字!',
  1432. type: 'warning',
  1433. })
  1434. return
  1435. }
  1436. if (
  1437. (this.aduitlist.unitPrice &&
  1438. String(this.aduitlist.unitPrice).indexOf('.') != -1 &&
  1439. String(this.aduitlist.unitPrice).length -
  1440. (String(this.aduitlist.unitPrice).indexOf('.') + 1) >
  1441. 2) ||
  1442. this.aduitlist.unitPrice > 100000 ||
  1443. this.aduitlist.unitPrice < 1
  1444. ) {
  1445. this.$message({
  1446. message: '单价输入错误',
  1447. type: 'warning',
  1448. })
  1449. return
  1450. }
  1451. if (
  1452. (this.aduitlist.salePlanType == '期货' &&
  1453. this.aduitlist.basis &&
  1454. String(this.aduitlist.basis).indexOf('.') != -1 &&
  1455. String(aduitlist.basis).length -
  1456. (String(this.aduitlist.basis).indexOf('.') + 1) >
  1457. 2) ||
  1458. (this.aduitlist.salePlanType == '期货' &&
  1459. this.aduitlist.basis > 10000) ||
  1460. (this.aduitlist.salePlanType == '期货' && this.aduitlist.basis < 1)
  1461. ) {
  1462. this.$message({
  1463. message: '基差输入错误',
  1464. type: 'warning',
  1465. })
  1466. return
  1467. }
  1468. if (
  1469. (this.aduitlist.invoiceFee &&
  1470. String(this.aduitlist.invoiceFee).indexOf('.') != -1 &&
  1471. String(aduitlist.invoiceFee).length -
  1472. (String(this.aduitlist.invoiceFee).indexOf('.') + 1) >
  1473. 2) ||
  1474. this.aduitlist.invoiceFee > 1000 ||
  1475. this.aduitlist.invoiceFee < 0
  1476. ) {
  1477. this.$message({
  1478. message: '发票费用输入错误',
  1479. type: 'warning',
  1480. })
  1481. return
  1482. }
  1483. if (this.aduitlist.salePlanType == '期货') {
  1484. this.aduitlist.basis = '+' + this.aduitlist.basis
  1485. }
  1486. this.aduitlist.salePlanType = this.aduitlist.salePlanType
  1487. this.dialogFormVisible4 = false
  1488. this.$confirm(`审核通过后,将通知客户订单生效,是否确定通过审核?`, {
  1489. confirmButtonText: '确定',
  1490. cancelButtonText: '取消',
  1491. type: 'warning',
  1492. }).then(() => {
  1493. aduitsale(this.aduitlist)
  1494. .toPromise()
  1495. .then((response) => {
  1496. this.$message.success('审核成功')
  1497. this.getList()
  1498. })
  1499. })
  1500. },
  1501. //客户
  1502. customer(item) {
  1503. this.dialogFormVisible8 = true
  1504. if (item.customerInfo) {
  1505. this.customerlist = item.customerInfo
  1506. this.customerlist.cardAddressUrl1 =
  1507. this.customerlist.cardAddressUrl.split(',')[0]
  1508. this.customerlist.cardAddressUrl2 =
  1509. this.customerlist.cardAddressUrl.split(',')[1]
  1510. this.customerlist.payeeAddressUrl1 =
  1511. this.customerlist.payeeAddressUrl.split(',')[0]
  1512. this.customerlist.payeeAddressUrl2 =
  1513. this.customerlist.payeeAddressUrl.split(',')[1]
  1514. }
  1515. },
  1516. //列表
  1517. getList() {
  1518. detailsList({
  1519. compId: sessionStorage.getItem('ws-pf_compId'),
  1520. currentPage: this.currentPage,
  1521. pageSize: this.pageSize,
  1522. pcFlag: this.pcFlag,
  1523. searchType: this.searchType,
  1524. searchKeyWord: this.searchKeyWord,
  1525. })
  1526. .toPromise()
  1527. .then((response) => {
  1528. for (var i = 0; i < response.records.length; i++) {
  1529. response.records[i].basischange = false
  1530. response.records[i].openPosition =
  1531. response.records[i].cumulativeTurnover -
  1532. response.records[i].closedPosition -
  1533. response.records[i].stockOutQuantity
  1534. }
  1535. this.warehouseList = response
  1536. this.deptCircularPage.currentPage = response.current
  1537. this.deptCircularPage.pageSize = response.size
  1538. this.deptBudgetTotal = response.total
  1539. })
  1540. //包装方式
  1541. packList({ constId: 'PRO2' })
  1542. .toPromise()
  1543. .then((response) => {
  1544. this.packingTypeList = response
  1545. })
  1546. // 发票
  1547. packList({ constId: 'PRO5' })
  1548. .toPromise()
  1549. .then((response) => {
  1550. this.invoiceList = response
  1551. })
  1552. // 合同编号
  1553. aduitcontractno({
  1554. compId: sessionStorage.getItem('ws-pf_compId'),
  1555. flag: 1,
  1556. })
  1557. .toPromise()
  1558. .then((response) => {
  1559. this.contractNolist = response
  1560. })
  1561. },
  1562. Changepricerecord(item) {
  1563. this.dialogFormVisible5 = true
  1564. this.pricechange = item.priceChangeRecordList
  1565. },
  1566. closedPosition(item) {
  1567. this.dialogFormVisible7 = true
  1568. this.closePositionList = item.closePositionList
  1569. },
  1570. transactionRecord(item) {
  1571. this.dialogFormVisible6 = true
  1572. this.transactionRecordList = item.transactionRecordList
  1573. },
  1574. selectpackingType(e) {
  1575. for (var i = 0; i < this.packingTypeList.length; i++) {
  1576. if (this.packingTypeList[i].constValue == e) {
  1577. this.aduitlist.packingTypeKey = this.packingTypeList[i].constKey
  1578. console.log(this.packingTypeList[i].constKey)
  1579. }
  1580. }
  1581. },
  1582. selectType(e) {
  1583. for (var i = 0; i < this.invoiceList.length; i++) {
  1584. if (this.invoiceList[i].constValue == e) {
  1585. this.aduitlist.typeKey = this.invoiceList[i].constKey
  1586. }
  1587. }
  1588. },
  1589. handleRemove(file) {
  1590. console.log(file)
  1591. },
  1592. handlePictureCardPreview(file) {
  1593. this.dialogImageUrl = file.url
  1594. this.dialogVisible = true
  1595. },
  1596. handleDownload(file) {
  1597. console.log(file)
  1598. },
  1599. getSpanArr(data) {
  1600. let that = this
  1601. //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
  1602. that.spanArr = []
  1603. that.pos = 0
  1604. // //遍历数据
  1605. data.forEach((item, index) => {
  1606. //判断是否是第一项
  1607. if (index === 0) {
  1608. this.spanArr.push(1)
  1609. this.pos = 0
  1610. } else {
  1611. //不是第一项时,就根据标识去存储
  1612. if (data[index].warehouseNumViewList.length > 1) {
  1613. 查找到符合条件的数据时每次要把之前存储的数据 + 1
  1614. this.spanArr[this.pos] = data[index].warehouseNumViewList.length
  1615. this.spanArr.push(0)
  1616. } else {
  1617. // 没有符合的数据时,要记住当前的index
  1618. this.spanArr.push(1)
  1619. this.pos = index
  1620. }
  1621. }
  1622. })
  1623. },
  1624. //返回
  1625. revert() {
  1626. this.$router.push({ path: 'warehouseManagementList' })
  1627. },
  1628. dateFormat(fmt, date) {
  1629. let ret
  1630. const opt = {
  1631. 'Y+': date.getFullYear().toString(), // 年
  1632. 'm+': (date.getMonth() + 1).toString(), // 月
  1633. 'd+': date.getDate().toString(), // 日
  1634. 'H+': date.getHours().toString(), // 时
  1635. // "M+": date.getMinutes().toString(), // 分
  1636. // "S+": date.getSeconds().toString() // 秒
  1637. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  1638. }
  1639. for (let k in opt) {
  1640. ret = new RegExp('(' + k + ')').exec(fmt)
  1641. if (ret) {
  1642. fmt = fmt.replace(
  1643. ret[1],
  1644. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  1645. )
  1646. }
  1647. }
  1648. return fmt
  1649. },
  1650. handleClose() {
  1651. this.accessoryTFs = false
  1652. },
  1653. handleSizeChange(val) {
  1654. console.log(`每页 ${val} 条`)
  1655. this.pageSize = val
  1656. this.getList()
  1657. },
  1658. handleCurrentChange(val) {
  1659. this.currentPage = val
  1660. console.log(`当前页: ${val}`)
  1661. this.getList()
  1662. },
  1663. selecttaskType(e) {
  1664. for (var i = 0; i < this.taskTypeList.length; i++) {
  1665. if (this.taskTypeList[i].value == e) {
  1666. this.searchType = this.taskTypeList[i].type
  1667. }
  1668. }
  1669. },
  1670. handleExamine(row) {
  1671. this.$router.push({
  1672. name: 'salesContractExamine',
  1673. query: { id: row.id },
  1674. })
  1675. },
  1676. // 关闭 dialog时 处理文件url 初始化upload组件
  1677. handleCloe() {
  1678. this.dialogViewSpareMoney = false
  1679. },
  1680. history(row) {
  1681. billoperatehis({ id: row.id })
  1682. .toPromise()
  1683. .then((response) => {
  1684. this.historyList = response
  1685. })
  1686. },
  1687. async exportlist() {
  1688. const { data } = await export1(
  1689. {
  1690. compId: sessionStorage.getItem('ws-pf_compId'),
  1691. contractType: this.contractType,
  1692. currentPage: this.currentPage,
  1693. pageSize: this.pageSize,
  1694. searchType: this.searchType,
  1695. searchKeyWord: this.searchKeyWord,
  1696. startDate: this.startDate,
  1697. endDate: this.endDate,
  1698. },
  1699. {},
  1700. { responseType: 'blob' }
  1701. ).toPromise()
  1702. downloadFile({
  1703. res: data,
  1704. fileName: `${
  1705. this.date.year + (this.date.month ? `-${this.date.month}` : '')
  1706. }_销售合同`,
  1707. type: 'xls',
  1708. })
  1709. },
  1710. total() {},
  1711. },
  1712. }
  1713. </script>
  1714. <style lang="scss" scoped>
  1715. // @import '../../../../static/iconfont/iconfont.css';
  1716. .connert {
  1717. width: 90%;
  1718. margin: 0 auto;
  1719. }
  1720. .vertical-text-left {
  1721. width: 62px;
  1722. text-align: right;
  1723. }
  1724. //分页
  1725. .el-pagination {
  1726. padding: 10px 15px;
  1727. margin-bottom: 0;
  1728. text-align: center;
  1729. }
  1730. /deep/.el-pager li.active {
  1731. color: #5878e8;
  1732. cursor: default;
  1733. }
  1734. /deep/.el-pager li:hover {
  1735. color: #5878e8;
  1736. cursor: default;
  1737. }
  1738. .el-button--primary {
  1739. background-color: #5878e8;
  1740. border-color: #5878e8;
  1741. }
  1742. .el-button--default {
  1743. color: #8890b1;
  1744. border-color: #e8eaf1;
  1745. }
  1746. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  1747. width: 30px;
  1748. margin-left: 0;
  1749. border-top-left-radius: 0px;
  1750. border-bottom-left-radius: 0px;
  1751. margin-top: -1px;
  1752. margin-left: -5px;
  1753. }
  1754. /deep/.findValue .el-input__inner {
  1755. border-top-right-radius: 0px;
  1756. width: 385px;
  1757. }
  1758. .completed.el-button--default {
  1759. border-color: #5878e8;
  1760. background-color: #f6f7fc;
  1761. color: #5878e8;
  1762. }
  1763. .putstorage.el-button--default,
  1764. .deliverystorage.el-button--default {
  1765. border-color: #8890b1;
  1766. background-color: #fff;
  1767. color: #8890b1;
  1768. }
  1769. /deep/.el-table td,
  1770. /deep/.el-table th.is-leaf {
  1771. border-right: 1px solid #e9ecf7;
  1772. text-align: center;
  1773. }
  1774. /deep/.el-table tr td:first-child,
  1775. /deep/.el-table tr th.is-leaf:first-child {
  1776. border-left: 1px solid #e9ecf7;
  1777. }
  1778. .record,
  1779. .adjustment {
  1780. display: inline-block;
  1781. color: #5878e8;
  1782. padding: 0 4px !important;
  1783. position: relative;
  1784. }
  1785. .record:after {
  1786. position: absolute;
  1787. content: '';
  1788. display: block;
  1789. top: 5px;
  1790. right: -2px;
  1791. width: 1px;
  1792. height: 12px;
  1793. background: #e9ecf7;
  1794. }
  1795. // .el-row{
  1796. // height: 150px;
  1797. // }
  1798. .base_header_layout .grid-content {
  1799. margin-top: 80px;
  1800. }
  1801. .el-input--small .el-input__inner {
  1802. margin-left: 20px;
  1803. }
  1804. .el-range-editor--small.el-input__inner {
  1805. height: 32px;
  1806. margin-left: -20%;
  1807. }
  1808. //执行样式
  1809. .executory,
  1810. .inExecution,
  1811. .done {
  1812. width: 6px;
  1813. height: 6px;
  1814. display: inline-block;
  1815. border-radius: 50%;
  1816. position: relative;
  1817. top: -1px;
  1818. font-size: 14px;
  1819. }
  1820. .executory {
  1821. background: #ff9f24;
  1822. }
  1823. .inExecution {
  1824. background: #5878e8;
  1825. }
  1826. .done {
  1827. background: #50cad4;
  1828. }
  1829. .record,
  1830. .adjustment {
  1831. display: inline-block;
  1832. color: #5878e8;
  1833. padding: 0 4px !important;
  1834. position: relative;
  1835. font-size: 14px;
  1836. }
  1837. .container {
  1838. overflow: scroll;
  1839. height: 93vh;
  1840. }
  1841. .button-container {
  1842. display: flex;
  1843. flex-wrap: nowrap;
  1844. justify-content: space-between;
  1845. align-items: center;
  1846. background-color: #fff;
  1847. width: 100%;
  1848. height: 50px;
  1849. padding: 0 10px;
  1850. & > div {
  1851. margin-left: 10px;
  1852. display: flex;
  1853. flex-wrap: nowrap;
  1854. flex-direction: row;
  1855. & > span {
  1856. line-height: 50px;
  1857. }
  1858. }
  1859. /deep/.auditFlow-box {
  1860. position: unset;
  1861. margin-left: 10px;
  1862. &/deep/.auditFlow-icon {
  1863. width: auto;
  1864. padding-right: 30px;
  1865. }
  1866. &/deep/.auditFlow-main {
  1867. position: absolute;
  1868. }
  1869. }
  1870. }
  1871. .bg-left {
  1872. padding-left: 30px;
  1873. }
  1874. .title {
  1875. position: relative;
  1876. }
  1877. .title::before {
  1878. content: '';
  1879. display: inline-block;
  1880. width: 5px;
  1881. height: 30px;
  1882. background: #5473e8;
  1883. position: absolute;
  1884. left: 0;
  1885. }
  1886. .el-button--primary {
  1887. background-color: #5878e8;
  1888. border-color: #5878e8;
  1889. // margin-left: 85%;
  1890. margin-top: 20px;
  1891. }
  1892. //导航条样式
  1893. .el-col-12 {
  1894. width: 50%;
  1895. height: 60px;
  1896. background: #f6f7fc;
  1897. border-radius: 4px 4px 1px 1px;
  1898. }
  1899. .el-input--small .el-input__inner {
  1900. height: 32px;
  1901. line-height: 32px;
  1902. width: 385px;
  1903. margin-top: 10px;
  1904. }
  1905. .bg-bottom {
  1906. margin-left: 85%;
  1907. }
  1908. .but {
  1909. margin-left: 30%;
  1910. /* margin-top: -32px; */
  1911. overflow: auto;
  1912. /* float: left; */
  1913. /* margin-left: 1px; */
  1914. margin-left: -10px;
  1915. }
  1916. /deep/.el-table .el-table__header .cell,
  1917. .el-table .el-table__body .cell {
  1918. text-align: center;
  1919. }
  1920. .el-scrollbar__wrap {
  1921. overflow-y: hidden;
  1922. }
  1923. .deal {
  1924. width: 66%;
  1925. }
  1926. .photo {
  1927. padding: 0% 34%;
  1928. }
  1929. .photo1 {
  1930. padding: 0 10%;
  1931. }
  1932. .photo2 {
  1933. padding: 0 55%;
  1934. }
  1935. /deep/.el-form-item--small .el-form-item__label,
  1936. .el-form-item--small .el-form-item__content {
  1937. text-align: center;
  1938. }
  1939. hr {
  1940. width: 91%;
  1941. }
  1942. /deep/.deaal {
  1943. width: 66%;
  1944. margin-left: 9%;
  1945. }
  1946. /deep/.closeposition .el-form-item__label {
  1947. width: 160px;
  1948. }
  1949. .customer .el-form-item {
  1950. border-bottom: 1px solid #ccc;
  1951. }
  1952. .base_header_layout {
  1953. padding: 10px 10px 0;
  1954. background-color: #fff;
  1955. height: 50px;
  1956. }
  1957. </style>